in reply to Re^9: Iterating Through Cell Blocks with Spreadsheet::Read
in thread Iterating Through Cell Blocks with Spreadsheet::Read
Further to Anonymonk's point:
>perl -wMstrict -le "use Data::Dump; ;; my $sheet = { qw(F29 foo G30 bar) }; dd $sheet; ;; my %sheet; ;; print qq{'$sheet->{F29}'}; print qq{'$sheet{G30}'}; " { F29 => "foo", G30 => "bar" } 'foo' Use of uninitialized value $sheet{"G30"} in concatenation (.) or strin +g at -e line 1. ''
Do you see how the expressions $sheet->{F29} and $sheet{G30} access two completely different structures, one of which is empty?
... I can make no sense of the order in which it displays contents.
A hash has no internal "order" except for the pairing of each unique key with its value. Access to and listing of hash keys, values and key/value pairs is (apparently) random. (Update: Don't be mislead by the fact that the order in the dump displayed above matches the order of initialization of the hash reference example: this is entirely adventitious. The dump of a larger hash structure will show greater disorder — but again, a key always cleaves to its value.)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^11: Iterating Through Cell Blocks with Spreadsheet::Read
by Hammer2001 (Novice) on Oct 08, 2013 at 23:00 UTC | |
by AnomalousMonk (Archbishop) on Oct 09, 2013 at 04:27 UTC | |
by Hammer2001 (Novice) on Oct 09, 2013 at 04:38 UTC | |
by AnomalousMonk (Archbishop) on Oct 09, 2013 at 06:18 UTC |