Re: Condition Evaluation

2002-10-14 Thread eric-perl
On Tue, 1 Oct 2002, Michael Fowler wrote: > While this works, typically the way I do it is something along the lines of: > > usage("Specify a directory to scan ...\n") unless defined $directory; > usage("Provide a comment for the ...\n") unless defined $comment; > > and so on, where us

Re: Condition Evaluation

2002-10-01 Thread Michael Fowler
On Mon, Sep 30, 2002 at 03:50:00PM +0800, [EMAIL PROTECTED] wrote: > I found my mistake: I misread the line number in the error message. DOH!!! > The complaints were related to the block that prints individualized error > messages: Ok, I'm glad you solved your problem. > > unless (defined $di

Re: Condition Evaluation

2002-09-30 Thread eric-perl
I found my mistake: I misread the line number in the error message. DOH!!! The complaints were related to the block that prints individualized error messages: unless (defined $directory && defined $comment && defined $max_rows && defined $max_cols && defined $lg_dim && $lg_dim =~ m/[1-9][0-9]?/

Re: Condition Evaluation

2002-09-30 Thread eric-perl
On Mon, 30 Sep 2002, Michael Fowler wrote: > I cannot duplicate your problem. Given the code: > > perl -wle 'print "hi" if defined $bar && (!defined $foo || abs($foo) >< 100)' > > I see no 'Use of uninitialized value' warnings, and no print. Are you > certain the code you posted is

Re: Condition Evaluation

2002-09-30 Thread Michael Fowler
On Mon, Sep 30, 2002 at 12:52:47PM +0800, [EMAIL PROTECTED] wrote: [snip] > unless (defined $directory && defined $comment && defined $max_rows && > defined $max_cols && (!defined $saturation || abs($saturation) < 100)) { > # Print error messages > } > > WHAT'S HAPPENING: > Without setti

Condition Evaluation

2002-09-30 Thread eric-perl
Hello, All: I'm testing to determine that a list of variables has been set and am baffled by how this conditional is evaluating: CODE SNIPPET: GetOptions( 'comment=s' => \$comment, # Req'd arg 'directory=s' => \$directory, # Req'd arg 'rows=i'