Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Yes - you have understood the sequence correctly.
The relevant document is the "Symbol Table" section of perlmod. The symbol table for a package happens to be stored in the hash of that name with two colons appended. The main symbol table's name is thus %main::, or %:: for short. ... Hence "$::" is de-referencing the "%main::" hash, using "$_" as the key. The following parens prvide the "sub" context, and allow the sub to be passed the $_ param. Earth first! (We'll rob the other planets later) In reply to Re^3: Canon concerning coderef calls?
by NetWallah
|
|