|go ahead... be a heretic|
Question on a question - qqby nefigah (Monk)
|on Mar 06, 2008 at 03:17 UTC||Need Help??|
nefigah has asked for the
wisdom of the Perl Monks concerning the following question:
I had a question on a question I read here in Seekers of Perl Wisdom, and decided I'd better post it separately so as to not derail his thread with my noobism.
Is it cool to populate a hash of arrays with qq or qw? e.g.
Now, my question doesn't have to do with his exact question, as that was answered quite smartly in Hash of Arrays (populating and iterating).
I'm curious what the qq( ) is doing in the above example. Populating an array with qw( ) I certainly understand, but from what I've been able to tell from the docs and googling, qq() is just a way to say " " without having to use those characters, in case your string has double quotes but you still want interpolation.
Does that mean his array (stored by reference in the hash with the 'non' key) only contains 1 element, e.g. "rhino giraffe"? Would it have been equivalent to do non => [ "rhino giraffe" ]? My gut says no, but my brain can't justify it :P