>
> When you say:
>
> if ($add_alias) { ... }
>
> You are testing to see if $add_alias is true. If $add_alias = 0, the block
> won't be executed. 0 may be a valid value for $add_alias to have. If this
> is the case, you probably should be testing to make sure $add_alias is
> defined, meanin
On Thu, Jun 14, 2001 at 01:51:29PM -0500, [EMAIL PROTECTED] wrote:
> i am running through a series of if/elsif checks on a variable:
>
> if (($add_alias) && ($add_destination) && (!$selection)) {
>
>if ( $add_alias =~ /[^\w\.\-]/ ) {
>
>} elsif ( $add_destination !~ /\@/ ) {
>
>} e
On Thu, Jun 14, 2001 at 11:10:43PM -0500, [EMAIL PROTECTED] wrote:
> > Format to taste, of course. Your checks on $add_alias, $add_destination,
> > and $selection should also probably be checks for defined'ness, not truth.
> > 0 is false, but, according to your definition of what $add_alias shoul
> If this is really what your code looks like, with unused blocks and all,
> it's better written as:
>
> if ( $add_alias && $add_destination && !$selection
> && $add_alias !~ /[^\w\.\-]/]
> && $add_destination !~ /\@/
> ) {
> # ... code goes here ...
> }
On Thu, Jun 14, 2001 at 01:51:29PM -0500, [EMAIL PROTECTED] wrote:
> i am running through a series of if/elsif checks on a variable:
>
> if (($add_alias) && ($add_destination) && (!$selection)) {
>
>if ( $add_alias =~ /[^\w\.\-]/ ) {
>
>} elsif ( $add_destination !~ /\@/ ) {
>
>} e