Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Inserting an array in an array of hashes

by toolic (Bishop)
on Oct 18, 2012 at 17:28 UTC ( #999782=note: print w/replies, xml ) Need Help??


in reply to Inserting an array in an array of hashes

perldsc
use warnings; use strict; my @file_attachments = ( {file => 'test1.zip', price => ['10.00'], desc => 'the +1st test'}, {file => 'test2.zip', price => ['12.00', '12.50'], desc => 'the +2nd test'}, {file => 'test3.zip', price => ['13.00'], desc => 'the +3rd test'}, {file => 'test4.zip', price => ['14.00'], desc => 'the +4th test'} ); for (0 .. 3) { print "@{ $file_attachments[$_]{price} }\n"; } __END__ 10.00 12.00 12.50 13.00 14.00

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://999782]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2016-12-03 12:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (55 votes). Check out past polls.