You have mentioned that you want to match only complex.12 and not complex.120, so you can try this.
You have not clearly mentioned that whether the number of digits vary, so you can try this
undef $/;
$file2 = <FILE>;if ($file2 =~ /complex\.\d{2}/) { $pre = $` $line = ($pre =~ s/\n/\n/g); print "$line"; }
Prasad
In reply to Re: pattern match
by prasadbabu
in thread pattern match
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |