no...it was supposed to be $options{a} and $options{i}... I accidentally put
a twice in the email....
----- Original Message -----
From: "Brett W. McCoy" <[EMAIL PROTECTED]>
To: "Tyler Longren" <[EMAIL PROTECTED]>
Cc: "Mooney Christophe-CMOONEY1" <[EMAIL PROTECTED]>; "Perl Beginners"
<[EMAIL PROTECTED]>
Sent: Tuesday, July 17, 2001 1:26 PM
Subject: Re: if something equals nothing


> On Tue, 17 Jul 2001, Tyler Longren wrote:
>
> > That doesn't seem to work.  I want if a variable doesn't equal anything,
> > then do something.  Here's a piece:
> > if ($options{a} eq "" && $options{a} eq "") {
>
> You are comparing the same thing here twice???
>
> How about
>
> if ( !defined($options{a}) && !defined($options{i}) ) {
>
>   ...
> }
>
> Usually for usage messages, though, I do something like:
>
> my $usage =<<"USAGE";
> usage stuff
> usage stuff
> USAGE
>
> my $someval = $ARGV[0] or die $usage;
>
> -- Brett
>    http://www.chapelperilous.net/btfwk/
> ------------------------------------------------------------------------
> You need no longer worry about the future.  This time tomorrow you'll be
dead.
>
>
> --
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to