in reply to Re^2: Structure number
in thread Structure number
Will you please kindly tell me what will be the modification if another column is added to the input file? but the output should be the same as the previous one omitting the alphabets? If the input file is
536 ENERGY = -176.2 gagI have tried the following but its not working
open(MYFILE, $data_file) || die("Could not open file!"); my $energy; while ( <MYFILE> ) { if ( /\bENERGY\b/ ) { ++$energy; next; } my ( $key, @fields ) = grep $_, split; for my $field ( @fields ) { if (@fields[2] ne G || A || C || G) { print "$key $field $energy\n"; } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Structure number
by jwkrahn (Abbot) on Dec 02, 2010 at 08:30 UTC | |
by AG87 (Acolyte) on Dec 02, 2010 at 09:02 UTC | |
by AG87 (Acolyte) on Dec 02, 2010 at 09:25 UTC | |
by AG87 (Acolyte) on Dec 02, 2010 at 17:48 UTC |