Michael Gale wrote: > Hello, Hello,
> I am going a perl file called snacktime.pl I got from: > > http://www.planb-security.net/wp/snacktime.html > > I do not understand how the "shift and die" line works in the following > code section: > > shift and die "Missing some options. Try $0 -h for help.\n"; > # Complain if there's anything unexpected. That is short for: shift @ARGV and die "Missing some options. Try $0 -h for help.\n"; and will die if $ARGV[0] is NOT either undef or 0 or '' but it is usually, and more correctly, written as: @ARGV and die "Missing some options. Try $0 -h for help.\n"; John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>