Re: Cmd Line args

2001-07-16 Thread Jeff 'japhy' Pinyan
On Jul 16, David Gilden said: >$sort_order = $ARGV[0] || $usage; # grab command line args > >$usage =" ># Type a number after the script name to choose the type of sorting: ># 1 = sort by type ># 2 = sort by name ># 3 = sort by color ># 4 = sort by food ># ># Example: ># perl bears.pl 1 ># sorts

Re: Cmd Line args

2001-07-16 Thread Randal L. Schwartz
> "Jason" == Jason Purdy <[EMAIL PROTECTED]> writes: Jason> From a newbie perspective, your code is flawed (no offense :)). Your line: Jason> $sort_order = $ARGV[0] || $usage; Jason> is saying set $sort_order to $ARGV[0] (no matter what it is, or even if it's Jason> defined) or eval (not su

Re: Cmd Line args

2001-07-16 Thread Jason Purdy
>From a newbie perspective, your code is flawed (no offense :)). Your line: $sort_order = $ARGV[0] || $usage; is saying set $sort_order to $ARGV[0] (no matter what it is, or even if it's defined) or eval (not sure if that's the right word for this context) $usage. So the code is doing the firs