good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Can't take a reference to a lexical variable? Surely you jest. What happened when you tried it? He wants a lexical variable because he wants a new hash at the start of each iteration of the loop. Pass that hash as a reference to the gather function (or better yet, just get the hash by having gather() return a reference). Global variables are bad news, and that's why this thread exists. :)
-- brian d foy <brian@stonehenge.com> In reply to Re^4: re-useing a hash
by brian_d_foy
|
|