Jump to content

Command-line arguments: Difference between revisions

→‎{{header|Perl}}: added Getopt::Long to Perl section
(Add Déjà Vu)
(→‎{{header|Perl}}: added Getopt::Long to Perl section)
Line 915:
my $second = $ARGV[1];
my $fifth = $ARGV[4];</lang>
 
If you don't mind importing a module:
 
<lang perl>use Getopt::Long;
GetOptions (
'help|h' => \my $help,
'verbose|v' => \my $verbose,
);
 
=={{header|Perl 6}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.