in reply to Re: Help with this statement
in thread Help with this statement

I couldn't resist this as a TIMTOWTDI :)
unless (abs($value - 454.5) - 1.5) { print something; } else { print nothing; }

cLive ;-)

Replies are listed 'Best First'.
Re: (cLive ;-) Re: Help with this statement
by Parham (Friar) on Jan 12, 2002 at 01:56 UTC
    just as an alternative, it can also be written as:
    my $value = 444; if ($value == 456) { print "something"; } elsif ($value == 453) { print "something"; } else { print "nothing"; }