Hi rsriram,
Here is one way to solve that problem, you are using the increment operator in find pattern of the regex which is not allowed, instead you increment before that and use the variable alone.
while (<DATA>) { $i++; push(@fnote, $1) if ($_ =~ /<FN$i>(.+)\n/); } $, = "\n"; print @fnote;
Prasad
In reply to Re: Searching a sequence of tags using regex
by prasadbabu
in thread Searching a sequence of tags using regex
by rsriram
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |