in reply to Re: hashes
in thread hashes

actually, for pre-existing hash, i'd combine japhy's with albannach's to get

%hash = (%hash, (map /(\S+)\s+(.*)/, <FILE>));
or i'd make the assignment part of the loop (which i'd change from map to for):
for (<FILE>) {/(\S+)\s+(.*)/ && $hash{$1} = $2}
... which is what kwolters wanted to avoid.

unfortunately, despite the fact that hashes can be coerced into arrays in most circumstances, you can't push onto them.

caveat: i cut & pasted and was not able to test this. i hate being on the road and having my server go boom. .

.