However, the better solution is to chuck the regex. It replaces $src in its entirety, so a simple $src = $newsrc (or replace both lines with $token->set_attr('src', $newsrc);) would be both easier to maintain and more effective.
HTH
In reply to Re: Loop behavior with HTML::TokeParser::Simple
by jsprat
in thread Loop behavior with HTML::TokeParser::Simple
by WhiteBird
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |