in reply to Re: Re: Check on if statement
in thread Check on if statement

In this case it would be more efficient because the AM who posted wants to check for either no value or a single question mark, if he/she wanted to check to see if the string was empty or a question mark anywhere in $foo then you would probably need something like
if(!$foo || $foo =~ /\?/){ # either its blank or there is a ? somewhere in it }

Replies are listed 'Best First'.
Re: Re: Re: Re: Check on if statement
by CukiMnstr (Deacon) on Aug 17, 2002 at 23:09 UTC
    if(!$foo || $foo =~ /\?/){ # either its blank or there is a ? somewhere in it }
    actually, that would read: # it is blank, '0' or there is a '?' somewhere in it