in reply to Usage of Shift function in PERL

@ARGV is the list of your scripts arguments. Try:
./script.pl 15
and change your code:
print shift; #@ARGV is the default in the main program
or:
$_ = shift and print;

Replies are listed 'Best First'.
Re: Re: Usage of Shift function in PERL
by nallasiv (Initiate) on May 03, 2004 at 10:50 UTC
    Thanks for your clarification. Now its working fine.