in reply to Re: perl error
in thread perl error
use strict; #-- Define in/out files my $inf = "test.txt" ; #-- variables and handles my $line; my $a; my $b; my @result; @row = ((0) x 361); @column = ((0) x 361); my @Matrix = ( @row, @column); #--Open the input and output files open (IN, "$inf") || die "Can't read $inf"; while ($line = <IN>) { @result = split(/\s+/, $line); $a = $result[0]; $a = int($phi); $b = $result[1]; $b = int($psi); @Matrix[$row[($a+180)]][$column[($b+180)]] += 1; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: perl error
by dreadpiratepeter (Priest) on Jul 29, 2011 at 00:10 UTC | |
by topaz (Initiate) on Jul 29, 2011 at 00:29 UTC | |
Re^3: perl error
by Anonymous Monk on Jul 28, 2011 at 23:58 UTC | |
by dreadpiratepeter (Priest) on Jul 29, 2011 at 00:18 UTC | |
by topaz (Initiate) on Jul 29, 2011 at 00:05 UTC |