Change the regex line to:
next unless $line =~ /\s+<\w+\/?>(.*)<\/\w+>/;
If the regex fails then $1 is not altered (as you noticed).
Why did you comment out use strict; btw? Your code is fine with strictures enabled.
In reply to Re: how to empty the built in variable
by GrandFather
in thread how to empty the built_in variable
by jesuashok
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |