in reply to Re: Re: another 'array to hash' question
in thread another 'array to hash' question
I really don't see why you shouldn't do it the way you have it coded here. And since you probably already know what the fields are, you can even skip the hash altogether. An array of arrays looks good to me.
my @a; while (<INFILE>) { my @line = split /\t/; push @a, \@line; # Array of array references }
Or even:
my @a; push @a, ( split /\t/ ) while (<INFILE>); # array of arrays
which provides a nice list context to put your input directly into an array. :)
--
Allolex
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: another 'array to hash' question
by punkish (Priest) on Dec 10, 2003 at 15:38 UTC | |
by allolex (Curate) on Dec 10, 2003 at 16:41 UTC |