in reply to Re^2: Modifying order of a hash
in thread Modifying order of a hash
Ah yes, should have tested my code. The first error is because you defined %newfile_attachments twice. The second error goes away if you use this:
foreach $fn (values %file_attachments) {
In your example you don't have a key 'FirstNum' in the hash. Be prepared to see an error message "Use of uninitialized value..." because of this. If you have subhashes with no key 'FirstNum', then you have to test for that and do something sensible with those subhashes
Btw, the output of Dumper looks much better if you use Dumper(\%x) instead of Dumper(%x)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Modifying order of a hash
by monaghan (Novice) on Sep 25, 2008 at 23:00 UTC | |
by jethro (Monsignor) on Sep 25, 2008 at 23:37 UTC | |
by monaghan (Novice) on Sep 26, 2008 at 00:11 UTC |