![]() |
|
Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re^4: re-useing a hashby brian_d_foy (Abbot) |
on Apr 21, 2005 at 03:05 UTC ( #449847=note: 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 Section
Seekers of Perl Wisdom
|
|