[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Perl command line



> I am looking for some example Perl code for capturing a command line
> variable or variables.  

To avoid 'reinventing the wheel', I would suggest requiring 'getopts.pl'.
It comes packaged in your standard perl distribution and you can do
something like (quoted from the getopts.pl file):

;# Usage:
;#
;#    do Getopts('a:bc');  # -a takes arg. -b & -c not. Sets opt_* as a
;#                         #  side effect.

For this example, $opt_a is populated with the argument required by 'a'

--
Christopher Hamilton            Internal System Administrator
chrish at ifsintl.com              IFS International, Inc.