>Is there an $ENV for command line variables? 
>Are their modules to make this easier?
>
>eg ./myperlscript.pl options here

You don't need ENV. The command line arguments are in @ARGV. Be careful
though, the command name is removed first, so $ARGV[0] is actually
argv[1] in C. And $#ARGV is not the number of arguments, but the index
of the last member of the array @ARGV, as this is the normal
relationship between @ and $# for Perl arrays. So with no arguments,
$#ARGV is -1, and with one argument, $#ARGV is 0.

Do perldoc Getopt::Std or perldoc Getopt::Long for modules that help you
parse options.


-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to