in reply to Extract line, matching more than one variable
Welcome to the Monastery! Make yourself at home.
To accomplish your task, go through perlopentut and perlre. Try some code and if you have any questions, you can come again here.
# Remove the newline from the DNA filename
open (PDBFILE, $pdbfile);
@sa = split(/\t/,$_);
#print "$sa $sa $sa\n";
#$res = substr $_, 0, 4;
#$res_no = substr $_, 4, 5;
#$atom =substr $_, 9, 3;
$res = substr $_, 17, 3;
$res_no = substr $_, 22, 4;
$atom =substr $_, 13, 3;
#print " $res $res_no $atom \n" ; # works fine
if (( $saeq$res)&&($sa==$res_no)&&($sa eq $atom))
print "$_"; # does not print anything.
Please use <code> tags to wrap the coding parts in your nodes.
Can you please show us your sample file, so that we can give solutions without assumption.
Went to join the gridlock to see it
Held an eclipse party
Watched a live feed
I cn"t see tge kwubosd to amswr thus
I tried to see it, but 8000 miles of rock got in the way
Wanted to see it, but they wouldn't reschedule it
Read the book instead
Results (237 votes). Check out past polls.