rayh has asked for the wisdom of the Perl Monks concerning the following question:
I know the comparison is true but the shift doesn't seem happy. If I type "print shift @ARGV", I can see the -s. However it doesn't want to be assigned to a variable.#!/usr/bin/perl if ($ARGV[0] eq '-s') { my $argument = shift @ARGV; } print "$argument";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: shift @ARGV not working
by toolic (Bishop) on May 09, 2013 at 18:44 UTC | |
by rayh (Initiate) on May 09, 2013 at 18:58 UTC | |
|
Re: shift @ARGV not working
by blue_cowdawg (Monsignor) on May 09, 2013 at 18:47 UTC | |
by Anonymous Monk on May 09, 2013 at 19:15 UTC | |
by Anonymous Monk on Apr 04, 2024 at 13:13 UTC |