I may be wrong (I've only read Mastering Regular Expressions once), but doesn't using $&, $'or $` anywhere in your program cause some fairly severe performance issues?
Looks like the regex originally used should work - just trying to print $_ instead of $_[0]