in reply to Bizarre hash/array [size,length,whatever-you-want-to-call-it] output
This has the strange habit of printing twice. If there are 18 elements I'll get 1818; 20 elements begets 2020.No matter what I pass into your program from the command line, I can not reproduce that result. Please show the exact command line you use to get that result. Also, post the contents of the hash using:
use Data::Dumper; print Dumper(\%randList);
On a side note, this:
can be simplified to this:foreach my $key (keys %randList) { push(@numList, $key); }
@numList = keys %randList;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Bizarre hash/array [size,length,whatever-you-want-to-call-it] output
by theillien1 (Acolyte) on May 31, 2010 at 07:53 UTC | |
by Khen1950fx (Canon) on May 31, 2010 at 08:02 UTC | |
|
Re^2: Bizarre hash/array [size,length,whatever-you-want-to-call-it] output
by theillien1 (Acolyte) on Jun 06, 2010 at 18:23 UTC | |
|
Re^2: Bizarre hash/array [size,length,whatever-you-want-to-call-it] output
by theillien1 (Acolyte) on Jun 06, 2010 at 20:28 UTC |