in reply to true/false condition - what am I doing wrong?
You can use a block construct to get this to work:
my $type = "add"; my $redo; $type eq "add" ? {$redo = "wiki_add2"} : {$redo = "wiki_edit2"}; print "With type: $type, we could redo: $redo \n";
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: true/false condition - what am I doing wrong?
by trizen (Hermit) on Dec 08, 2011 at 19:00 UTC |
In Section
Seekers of Perl Wisdom