Beefy Boxes and Bandwidth Generously Provided by pair Networks vroom
The stupid question is the question not asked
 
PerlMonks  

Re^3: Foreach in a 2D array

by hmerrill (Friar)
on Oct 28, 2004 at 14:10 UTC ( [id://403474]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Re^2: Foreach in a 2D array
in thread Foreach in a 2D array

You're right. Sorry, I was a little quick to correct the "," to "=>", but I think the comma works fine as you pointed out. I'm so used to using "=>" that at first glance I thought using the comma was illegal. The "as long as you know that the list has an even number of elements..." part is enough for me to use the 2nd version ("=>") since I know the 2nd one works all the time :-) In fact all the perl documentation on hashes shows the "=>" operator.

As I think you'll agree, in this code:

my %hash = ('a', 'b', 'c', 'd');
it is not clear that 'a' is the key referring to value 'b'.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://403474]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.