You are familiar with the concept that we can have $I, @I, %I, sub I {}, and a file handle called I? A glob ( indicated by the *I ) is a convenient way of referring to all of them at once.
Basically, the *I{HASH} construct means we are only referring to the HASH part if the glob. When the assignment is done ( *I = getSlashConf() ), we are certain that only the HASH portion of the glob will be reassigned. After the assignment, %I now refers to whatever getSlashConf returns and we can treat it like a normal hash, or in this case, a hash of hashes. It is a clever way of returning a reference without returning a reference.
If you are not familiar with globs, get yourself a copy of Conway's Object Oriented Perl, because he explains what globs are, how they work and what this kind of assignment is doing in a very clear and concise way.
Mik
Mik Firestone ( perlus bigotus maximus )
In reply to Re: I just can't figure this out...
by mikfire
in thread I just can't figure this out...
by azaidi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |