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
|
---|
In Section
Seekers of Perl Wisdom