steph_bow has asked for the wisdom of the Perl Monks concerning the following question:
Hello
My script entries need some arguments whose number and place are well-defined and need some arguments whose number is variable
For example, here is the beginning of my code. I am not sure it is correct.
print STDOUT "enter the name of the beacon\n"; my $beacon = $ARGV[0]; print STDOUT "enter the value of the begin_time\n"; my $begin_time = $ARGV[1]; print STDOUT "enter the value of the end_time\n"; my $end_time = $ARGV[2]; print STDOUT "enter the days\n"; my @DAYS = @ARGV;
Won't @ARGV overwrite the first $ARGV ? @ARGV can contain several days, but their number varies
Thanks a lot
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: @ARGV: two different types of arguments
by GrandFather (Saint) on Jan 21, 2008 at 09:46 UTC | |
|
Re: @ARGV: two different types of arguments
by moritz (Cardinal) on Jan 21, 2008 at 09:36 UTC | |
|
Re: @ARGV: two different types of arguments
by apl (Monsignor) on Jan 21, 2008 at 12:35 UTC |