Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re^7: hash & arrays

by Spooky (Beadle)
on Nov 05, 2009 at 16:56 UTC ( [id://805311]=note: print w/replies, xml ) Need Help??


in reply to Re^6: hash & arrays
in thread hash & arrays

OK, I coded the following which seems to work - although I'm quite sure why it works: my %hash ; $title = 'engineer' ; $num = 23.4 ; $userid = 'ewh1234' ; @linx2 = (1, 2, 3) ; $hash{$userid} = [$title, $num, $linx2[0], $linx21, $linx2]; print "@{$hash{$userid}}\n" ; print "$hash{$userid}4\n" ; which produces: engineer 23.4 1 2 3 3 I have to learn more about hashes versus arrays - thanks for your help...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://805311]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-16 04:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found