in reply to Re^4: re-key a hash (not so clear)
in thread re-key a hash
In the first case, the knowledge of the left-hand side used in evaluating the right-hand side is purely an optimisation--effectively, extended context--which doesn't change the semantic outcome of the statement.quibble: it does change the semantic outcome. The game is judged to be worth the candle, though. Example:
Without the optimization, the default removal of trailing empty fields leaves $b undefined.use Data::Dumper; my ($a,$b,@a); ($a,$b) = split / /, "a "; print Dumper $a,$b; ($a,$b) = @a = split / /, "a "; print Dumper $a,$b;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: re-key a hash (not so clear)
by BrowserUk (Patriarch) on Aug 03, 2004 at 22:19 UTC |