in reply to array - separating elements in a 3-column list
use strict; use warnings; my $file = '3column.file'; my $i=0; open (INPUT, "<$file") or die "Could not open $file: $!"; my (%left_hash,%middle_hash,%right_hash); while (<INPUT>) { my ($left, $middle, $right) = split (/\s+/, $_); $left_hash{$i}=$left; $middle_hash{$i}=$middle; $right_hash{$i}=$right; $i++; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: array - separating elements in a 3-column list
by tphyahoo (Vicar) on Jan 27, 2005 at 11:18 UTC |