in reply to Re: Dereferencing code refs with & vs. ->()
in thread Dereferencing code refs with & vs. ->()
Are you saying that your code is littered with
Because I'm not sure I like that syntax. It looks very obfuscated, to my eyes.&{do { # stuff here sub { ... }; }};
$$hash_ref{key} = $$array_ref[1];
Yes, I see that a lot in older code. The problem is that this syntax only works because of how tightly $ binds vs. {} or []. You're depending on the Perl parser always guessing correctly. Maybe I'm paranoid, but I prefer not making the parser guess my intention.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Dereferencing code refs with & vs. ->()
by Anonymous Monk on Sep 23, 2005 at 14:34 UTC |