Aaron_A has asked for the wisdom of the Perl Monks concerning the following question:
as follows:#!/usr/bin/perl use warnings ; if ($#ARGV >= 0) {for ($n=0 ; $n<=$#ARGV ; $n++) {print("ARGV[$n]=$ARGV[$n]\n") ; } } else {print("No command line parameters found.\n") ; }
the output is:> args.pl abc
But when I run it using StrawberryPerl 5.10.1 I get:ARGV[0]=abc
Why? And what do I have to do to pick up the command line parameters?No command line parameters found.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Picking up command line arguments with Strawberry Perl: ARGV
by ikegami (Patriarch) on Jan 27, 2010 at 19:16 UTC | |
by Anonymous Monk on Jun 12, 2018 at 11:30 UTC | |
Re: Picking up command line arguments with Strawberry Perl: ARGV
by Anonymous Monk on Jan 27, 2010 at 18:52 UTC | |
Re: Picking up command line arguments with Strawberry Perl: ARGV
by Anonymous Monk on Jan 27, 2010 at 18:56 UTC |