in reply to Command line args

Alternatively, check out Getopt::Long. You'll like it.

#it's easy, mm-kay? a snippet from one of my scripts. use Getopt::Long; my %opt = (); GetOptions(\%opt, "rhost=s", # remote host as a (s)tring "ruser=s", # remote username as a (s)tring "rpwd=s", # remote password as a (s)tring "localDir=s", # local directory as a (s)tring ) or die "Invalid Command Line Options!\n"; #then use like this do_this() if $opt{rhost}; do_that() if $opt{ruser}; chdir $opt{localDir}; #etc etc
Update : Bah, runrig beat me to it.

Azatoth a.k.a Captain Whiplash

Make Your Die Messages Full of Wisdom!
Get YOUR PerlMonks Stagename here!
Want to speak like a Londoner?