I believe that's the equivalent of $type eq "add" ? ($redo = "wiki_add2" : $redo) = "wiki_edit2"; where the chained ='s apply the last value to everything.
In general, adding brackets to the false part will fix you right up.
$type eq "add" ? $redo = "wiki_add2" : ($redo = "wiki_edit2");In this specific case, you want what Taulmarill posted to avoid repeating yourself on the "$redo =" part.
In reply to Re: true/false condition - what am I doing wrong?
by Anonymous Monk
in thread true/false condition - what am I doing wrong?
by ultranerds
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |