open (IN, "filename.pdb") or die "$!";
while (my $line = <IN>) {
chomp($line);
my @array = (split(/\s+/,$line))[6,7,8];
print "@array\n";
}
close (IN);
Look into perls math operators for the distance calculations. The above just shows an example of how to get the last three columns from a line with 9 columns of varying length data seperated by spaces.
Reputation Points: 246
Solved Threads: 67
Practically a Posting Shark
Offline 898 posts
since Mar 2006