if ($_ != /<exm>/g)
You need to go back and have another read of perlop.
You're saying "if $_ isn't numerically equal to the value returned when you try to match /<exm>/ against $_". What you're trying to say is "if $_ doesn't match /<exm>/". That's written as:
if ($_ !~ /<exm>/)
or (perhaps easier to understand)
if (!/<exm>/)
When all else fails, it's always worth reading the documentation for the syntax you're trying to use :-)
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: Restarting counters in text
by davorg
in thread Restarting counters in text
by rsriram
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |