
AndrewF
Novice
Jul 18, 2013, 4:31 PM
Post #1 of 1
(2086 views)
|
Assigning arrays to columns in a file?
|
Can't Post
|
|
Hello there, Ive been stuck trying to assign two different arrays I have to two different columns in a file. [/codeopen (ECFILE, 'PEC,CEC.txt'); my @reactant; my @product; while (<ECFILE>){ my @all = <ECFILE>; push (@reactant, $all[0]); push (@product, $all[1]); print "@reactant\n"; print "@product\n"; }] the file is formatted like so... AA AA AB AB AC AC AD AD Any help? I know Im close to the answer but I've been looking at this for awhile and need another set of eyes to catch what I've missed. Thanks very much!
|