$1 contains what you capture with parens: no parens here in regex, so nothing in $1.if($readingframe2 =~ /MHGR/){ print "$1\n"; ($protein)= $readingframe2 =~ /MHGR/;
example: $ perl -e '$s="pilpoil";if ($s=~/p(.)lp(.)il/) { print "h".$1."h".$2;} +' hiho
In reply to Re: Regular expression problems
by brx
in thread Regular expression problems
by rattytatty
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |