Ahh..that worked wonderfully.  Thank you very much!

Tyler

----- Original Message -----
From: "Ela Jarecka" <[EMAIL PROTECTED]>
To: "'Tyler Longren'" <[EMAIL PROTECTED]>
Cc: "Beginners list (E-Mail)" <[EMAIL PROTECTED]>
Sent: Wednesday, June 27, 2001 9:39 AM
Subject: AW: getopt:std questions


I use it like this ( checking program options ):

my $usage = "$0 -s <servdata> -u <userdata> -b <begtime> -e <endtime> -f
<params>\n";
my %opts;
getopts('b:e:s:u:f:', \%opts);

my $servdata = $opts{s};
my $userdata = $opts{u};
my $begtime = $opts{b};
my $endtime = $opts{e};
my $reqdata = $opts{f};

Cheers,
Ela

> -----Ursprüngliche Nachricht-----
> Von: Tyler Longren [mailto:[EMAIL PROTECTED]]
> Gesendet: Mittwoch, 27. Juni 2001 16:24
> An: Perl Beginners
> Betreff: getopt:std questions
>
>
> Hello everyone,
>
> Here's a section of code:
> my %options;
> my $u;
> use strict;
> use Getopt::Std;
>
> getopts("dwmyau:", \%options);
>
> How can I get the value of the '-u' option and print it to the screen?
>
> I've tried this:
> $u = $options{u};
> print "$u";
> but that doesn't work...it doesn't print anything.  Can
> anybody shed some
> light on this for me?
>
> Thanks,
> Tyler Longren
>
>

Reply via email to