Assuming that $result is 0 or 1, I would concisify this thusly:print 'It ', ($result ? 'did ' : 'did not'), "match\n";
print 'It ', ('did' 'did not')[$result], "match\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: An alternative to ?: notation
by agoth (Chaplain) on Aug 09, 2000 at 18:56 UTC | |
by tilly (Archbishop) on Aug 09, 2000 at 19:08 UTC | |
|
(Ovid) RE: An alternative to ?: notation
by Ovid (Cardinal) on Aug 10, 2000 at 01:10 UTC | |
|
RE: An alternative to ?: notation
by ZZamboni (Curate) on Aug 10, 2000 at 18:05 UTC | |
|
RE: An alternative to ?: notation
by Cirollo (Friar) on Aug 09, 2000 at 18:59 UTC | |
by buzzcutbuddha (Chaplain) on Aug 09, 2000 at 19:09 UTC |