Example:
use Getopt::Std;
getopts("dwmy", \%options);
# If no command line option is specified print the usage.
if (!defined $options{d} && !defined $options{w} && !defined $options{m} &&
!de$
print "
Usage: log.pl < -d -w -m -y >
        -d       :  generate log for last 24 hours
        -w       :  generate log for last week
        -m       :  generate log for last month
        -y       :  generate log for last year\n";
exit;
}

Tyler

----- Original Message -----
From: "saliminl" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, July 09, 2001 3:11 PM
Subject: command line flags


> How do I take, for example, a file input name and command line flags when
> opening a perl script?  My desired input style is:
>
> % eproc -n FILENAME -m -d  etc.
>
> I need to make everything a scalar.  Thanks
>
> Neema Salimi
> [EMAIL PROTECTED]

Reply via email to