in reply to Fast Matrix Load
#!/usr/bin/perl -w use strict; use warnings; # create array ref and count my $matrix=(); my $i=0; open PROFILES, 'profile/profile.db' or die $!; while (<PROFILES>) { chomp; # add array as array ref to array ref @{$matrix->[$i]} = split /\t/; $i++; } close(PROFILES); # access referenced data like this print $matrix->[1]->[6]; # (7th element of 2nd row generally :) # should start at 0,0 exit(0);
cLive ;-)
Update: since you've added more info, I've updated above to reflect your existing code..
--
seek(JOB,$$LA,0);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (cLive ;-) Re: Fast Matrix Load
by Evanovich (Scribe) on Feb 17, 2002 at 03:43 UTC | |
by cLive ;-) (Prior) on Feb 17, 2002 at 05:08 UTC |