Don't ask to ask, just ask | |
PerlMonks |
Re^2: hash slice ? No thanks, I'm about to return...by leriksen (Curate) |
on Feb 20, 2005 at 00:35 UTC ( [id://432803]=note: print w/replies, xml ) | Need Help?? |
My intent was to return a list of key-value pairs, as in the code sample - and I'm not sure I agree with your doc-quote
… a list assignment in list context produces the list of lvalues assigned to, …
Isnt the list assigned to the hash(or list of key/value pairs) %return ? The list assigned _from_ is what I'm seeing returned.. Apart from that the list-fu is a neat trick, but perhaps the explicit return is more appropriate, as discussed later in this thread, or a better understanding of when to use return... ...it is better to be approximately right than precisely wrong. - Warren Buffet
In Section
Meditations
|
|