in reply to true/false condition - what am I doing wrong?
The correct way to use the teary operator would be like this:
$redo = $type eq "add" ? "wiki_add2" : "wiki_edit2";
I would like to tell you what exactly happens, when perl executes your version. But to be honest i can't quite figure it out.
$redo = $type eq "add" ? "wiki_add2" : "wiki_edit2";
I would like to tell you what exactly happens, when perl executes your version. But to be honest i can't quite figure it out.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: true/false condition - what am I doing wrong?
by sumeetgrover (Monk) on Dec 08, 2011 at 14:44 UTC | |
Re^2: true/false condition - what am I doing wrong?
by ultranerds (Hermit) on Dec 08, 2011 at 15:21 UTC |
In Section
Seekers of Perl Wisdom