if I invoke this script as follows:

perl bears.pl

ARGV[0] never seems to be false even though there are no args..

What did I do wrong here?
Thanks
Dave


#!/usr/bin/perl -w

$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 bears by type";





-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to