in reply to perl array of hashes help
Writeup Formatting Tips can also help you in your next posts :)@array1 = ( { 'url' => 'wp-content/uploads/2012/04/HB-177-Veto-Letter. +pdf' , 'bill' => 'CS3', 'HB', '177', 'Inmate Reentry', 'Porth', '3/9/ +12', '3/30/12', 'VETO' }, { 'url' => 'uploads/2012/03/3.29.12-Transmi +ttal-Letter-3.pdf' , 'bill' => 'CS1', 'HB', '697', ' School Board of +Sumter County', 'McBurney', '3/9/12', '3/16/12', 'VETO' }, { 'url' => + 'tent/uploads/2012/04/HB-865-Veto-Letter.pdf' , 'bill' => '', 'HB', +'865', 'Pinellas Suncoast Transit Authority, Pinellas County', 'Hoope +r', '3/9/12', '3/30/12', 'VETO' }, { 'url' => 't/uploads/2012/04/4.13 +.12-HB-917-Veto-Letter.pdf' , 'bill' => '', 'HB', '917', 'Jurisdictio +n of the Courts', 'Bileca', '3/7/12', '3/30/12', 'VETO' }, { 'url' => + 's/2012/04/HB-1117-Veto-Letter.pdf' , 'bill' => 'CS1', 'HB', '1117', + 'Conservation of Wildlife', 'Harrison', '3/9/12', '3/30/12', 'VETO' +} );
Hope this helpsfor my $line_hash (@array1){ if ($line_hash->{'bill'} =~ /1117/){ print "Found a match"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: perl array of hashes help
by roboticus (Chancellor) on Apr 30, 2012 at 13:19 UTC | |
by mrguy123 (Hermit) on Apr 30, 2012 at 13:25 UTC |