in reply to if variants
is acceptable, this:if($foo == 7) { print "foo is 7\n"; } else { print "foo is not 7\n"; }
is not. Sure, perl will accept it (I consider this to be a bug in perl), and it'll run, but anyone writing it should be beaten savagely. It's VERY hard to read.unless($foo != 7) { print "foo is 7\n"; } else { print "foo is not 7\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: if variants
by apotheon (Deacon) on Oct 20, 2004 at 18:57 UTC | |
by ihb (Deacon) on Oct 21, 2004 at 14:37 UTC | |
by apotheon (Deacon) on Oct 21, 2004 at 14:48 UTC | |
by DrHyde (Prior) on Oct 21, 2004 at 08:40 UTC | |
by apotheon (Deacon) on Oct 21, 2004 at 08:46 UTC | |
by DrHyde (Prior) on Oct 22, 2004 at 09:22 UTC | |
by apotheon (Deacon) on Oct 23, 2004 at 09:34 UTC |