Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
} </code>... for my $key (sort keys %block) { my $number = $block{$key}{data}[3]; $ << Not working print $number; print Dumper @{$block{$key}{data}}; # Dump: <code> =code [ { BIRTH => "11/04/2014", CODE => 4, NAME => "JOHN D.", NUMBER => 1234, }, ] [ { BIRTH => "11/04/2014", CODE => 4, NAME => "JOHN D.", NUMBER => 1234, }, ] [ { BIRTH => "11/04/2014", CODE => 4, NAME => "JOHN D.", NUMBER => 1234, }, ] [ { BIRTH => "11/04/2014", CODE => 4, NAME => "JOHN D.", NUMBER => 1234, }, ] [ { BIRTH => "11/26/2014", CODE => 3, NAME => "MARY LEE", NUMBER => 55666, }, ] [ { BIRTH => "11/26/2014", CODE => 3, NAME => "MARY LEE", NUMBER => 55666, }, ] [ { BIRTH => "11/26/2014", CODE => 3, NAME => "MARY LEE", NUMBER => 55666, }, ] =cut
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Accessing a hash element
by stevieb (Canon) on Nov 02, 2015 at 19:36 UTC | |
by Anonymous Monk on Nov 03, 2015 at 20:28 UTC | |
by stevieb (Canon) on Nov 03, 2015 at 22:46 UTC | |
|
Re: Accessing a hash element
by Preceptor (Deacon) on Nov 03, 2015 at 12:43 UTC |