in reply to shift @ARGV not working

Variables and Scoping:
#!/usr/bin/perl my $argument; if ($ARGV[0] eq '-s') { $argument = shift @ARGV; } print "$argument";

Tip #1 from the Basic debugging checklist:

Replies are listed 'Best First'.
Re^2: shift @ARGV not working
by rayh (Initiate) on May 09, 2013 at 18:58 UTC
    Derp. Duh. I was getting a little too fancy in a larger script and overlooked the use of "my" in a new block. Thanks!