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"; } } }
In reply to Re^3: Structure number
by AG87
in thread Structure number
by AG87
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |