The construct with parens is necessary for substitution after assignment, not just for plain conditional assignment.
($foo = $bar) =~ s/$pat/$subst/; # operates on $foo
In reply to Re^3: undefined or zero: loking for an elegant solution
by shmem
in thread undefined or zero: looking for an elegant solution
by Ratazong
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |