[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Perl command line
- Subject: [ale] Perl command line
- From: chrish at ifsintl.com (Chris Hamilton)
- Date: Wed, 10 Jun 1998 11:26:02 -0400 (EDT)
> 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.