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.
Once (shame on you!)
Twice (shame on me!)
More often than I'd like to be
All the time
Just when answering stupid polls
Who you callin' a fool?
I refuse to vote in this ridiculous poll
Results (432 votes). Check out past polls.