Just another Perl shrine | |
PerlMonks |
Re: Code Interpretationby muba (Priest) |
on Jul 28, 2014 at 15:37 UTC ( [id://1095378]=note: print w/replies, xml ) | Need Help?? |
You are correct so far. @allrefs is an array. To get an element out of an array, you use a syntax like $array[ INDEX ]. To get multiple elements out of an array, you'd use @array[ INDEX1, INDEX2, ..., INDEXN ]. That's what's going on here: we sort the values of the %uni_refs hash, and then use those values as the indexes of elements to extract from @allrefs and store them in @refs.
In Section
Seekers of Perl Wisdom
|
|