Welcome to the Monastery | |
PerlMonks |
Keep it consistentby kbrint (Sexton) |
on May 12, 2006 at 12:48 UTC ( [id://548973]=note: print w/replies, xml ) | Need Help?? |
If I need to pass it by reference to many places, then I create it as a reference as well. That way, code in the scope where it's created looks the same as elsewhere; both can use $h->{key}. Otherwise, in the scope where it's created you use $h{key}, and everywhere else you use $h->{key}
In Section
Seekers of Perl Wisdom
|
|