in reply to ?: conditionals
...that whenever $WorkingCopy{$key}= /p1/ was true (i.e., matched the value), "this" would be assigned to $WorkingCopy{$key}; if false (match failed) "that" would be assigned to $WorkingCopy{$key}
Perhaps you meant
$WorkingCopy{$key} = $WorkingCopy{$key} =~ /p1/ ? "this" : "that";
(as you have it, /p1/ is being matched against $_)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: ?: conditionals
by lcschreier (Novice) on Jan 18, 2010 at 02:05 UTC |