Usage:use Getopt::Long; my $days = 30; GetOptions( 'days=i', \$days ); print $days, "\n";
$ perl script.pl 30 $ perl script.pl -days 100 100 $ perl script.pl -days Option days requires an argument 30 $ perl script.pl -days many Value "many" invalid for option days (number expected) 30
In reply to Re: Use command line argument in script
by Anonymous Monk
in thread Use command line argument in script
by homer4all
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |