On Nov 5, 11:04 pm, Dejian Zhao <dejian.z...@gmail.com> wrote:
> Q2 ˣ в ˽ű ڲ $Fileformat ַ ˭ ˭
> һ ͬһ ڴ ַ
>
> perl -le 'my $a=1;my $b=\$a; $$b=5;print $a'
> 5 1
> в ൱ $b ű ڲ ı ൱ $a в ֵ
> ʱ ֱ ˽ű ڲ ֵ
>
> On 2011-11-6 10:56, Dejian Zhao wrote:
>
>
>
>
>
>
>
> > Q1,Q3,Q4 ˣ Q2 Dz ̫ ס
>
> > Q2 \$Fileformat ij $Fileformat Dz Եģ ᱨ ?Undefined argument
> > in option spec ڵ ˭ ˭ Ҿ Ӧ ǽű ڲ ı
> > $Fileformatȥ в Ӧ $FileformatӦ ָ в
> > fileformat ڴ ַ Ǵ Ͻ ƺ $Fileformat ã
> > в $Fileformat ѵ ˭ ˭ һ ʵ Dz ͬһ ڴ ַ
>
> > Q3: ԭ "fileformat:s"=>\$Fileformat д "fileformat:s"=>
> > \$fileformat ( Ȼǰ ǰ my $Fileformat Ϊmy $fileformat) ҿ
> > ű ж Сд Ҳ ѵ һ ĸ д Ͳ ⡣ Ǹ ϰ
> > ߵ ɣ Ҹ ϲ д "fileformat:s"=>\$fileformat
>
> > Q4: ˣ ӵġ @ARGV
>
> > On 2011-11-6 6:47, Michael Zeng wrote:
> >> perldoc GetOpt::Long Ӧ ܿ manual ܶ࣬ Ҽǵ
> >> ش
> >> 1 Ҳ鿴 perldoc Getopt::Long ֪ fileformat ʹ
> >> IJ Ӧ һ string Ȼ ݵ ڲ ʱ $Fileformat
> >> ֵ ô û
> >> Ҫ ֵĶ ұ Լ IJ ű
> >> test.pl <http://test.pl> -fileformat AAA -cutoff BBB -verbose CCCC
> >> -help DDD ,
> >> AAA, BBB, CCC , DDD Զ ı 滻 4 Ӷ ȡ
> >> 2 Ϊʲô \$Fileformat һ reference أ д "fileformat:s"=&
> >> gt;$Fileformat ɲ ԣ Ϊʲô ʲô
> >> ã һ 㶼 ã һ ָ Ķ
> >> 3 ⣬Ϊʲô ʹ fileformat ڲ Ͳ ʹ
> >> $fileformat ǻ $Fileformat أ test.pl <http://test.pl>
> >> û ռ $fileformat
> >> ű һ ʼӦ ö my ($Fileformat,$Cutoff,$Verbose,$Help); ˣ
> >> Ȼ ֻ Щ
> >> 4 д˳ ʱ صIJ ڲ GetOptions
> >> ?û б ָ IJ @ARGV
> >> ǵã Ӧ ǣ
> >> ٶ manual
>
> >> 2011/11/6 Dejian Zhao <dejian.z...@gmail.com
> >> <mailto:dejian.z...@gmail.com>>
>
> >> ڱ ˽ű (test.pl <http://test.pl/>) п ģ м
> >> ⣬ϣ ˸ һ ¡ л
>
> >> ==========test.pl <http://test.pl/>========
> >> use strict;
> >> use Getopt::Long;
>
> >> my ($Fileformat,$Cutoff,$Verbose,$Help);
> >> GetOptions(
> >> "fileformat:s"=>\$Fileformat,
> >> "cutoff:s"=>\$Cutoff,
> >> "verbose"=>\$Verbose,
> >> "help"=>\$Help
> >> );
> >> die `pod2text $0` if (@ARGV == 0 || $Help);
> >> =========================
>
> >> Ҫ GetOptions() IJ ֿ
> >> "fileformat:s"=>\$FileformatΪ δ 롣
>
> >> 1 Ҳ鿴 perldoc Getopt::Long ֪ fileformat
> >> ʹ õIJ Ӧ һ string Ȼ ݵ ڲ ʱ $Fileformat
> >> ֵ ô û
>
> >> 2 Ϊʲô \$Fileformat һ reference أ д
> >> "fileformat:s"=>$Fileformat ԣ Ϊʲô ʲô
>
> >> 3 ⣬Ϊʲô ʹ fileformat ڲ Ͳ ʹ
> >> $fileformat ǻ $Fileformat أ test.pl <http://test.pl
> >> /> û ռ $fileformat
>
> >> 4 д˳ ʱ صIJ ڲ GetOptions
> >> ?û б ָ IJ @ARGV
--
您收到此邮件是因为您订阅了 Google 网上论坛的"PerlChina Mongers 讨论组"论坛。
要向此网上论坛发帖,请发送电子邮件至 perlchina@googlegroups.com。
要取消订阅此网上论坛,请发送电子邮件至 perlchina+unsubscribe@googlegroups.com。
若有更多问题,请通过 http://groups.google.com/group/perlchina?hl=zh-CN 访问此网上论坛。
2011年11月9日星期三
[PerlChina] Re: 代码解读(GetOptions)
为啥二楼的帖子是乱码呢?
订阅:
博文评论 (Atom)
没有评论:
发表评论