in reply to parsing a scalar into an Array
You could use @hashes in the following way:my @hashes = map {{split}} <>; #Ain't perl neat?
Also, you can easily do an array of arrays instead:foreach (@hashes) my %hash = %{$_}; foreach (keys %hash) { print "$_ => $hash{$_}\t"; } print "\n"; }
my @arrays = map {[split]} <>; # Got it?
IMHO, people should use list operations (map, foreach, grep) in the right places.
|
|---|