in reply to Re^4: a use for hashes?
in thread a use for hashes?
my %relays; while (<>) { chomp; my ($id, $states) = split(' ', $_, 2); $relays{$id} = $states; }
Array:
my @relays; while (<>) { chomp; my ($id, $states) = split(' ', $_, 2); push @relays, [ $id, $states ]; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^6: a use for hashes?
by Spooky (Beadle) on Feb 03, 2010 at 16:01 UTC | |
|
Re^6: a use for hashes?
by Spooky (Beadle) on Feb 04, 2010 at 19:13 UTC |