That code did not produce that output. You seem to have omitted a print "$1,$2,$3\n";.
But ignoring that, I think that your problem might be that you're forgetting that \w will also match anything that matches \d.
See the Copyright notice on my home node.
"The first rule of Perl club is you do not talk about Perl club." -- Chip Salzenberg
In reply to Re: Regex refresher
by davorg
in thread Regex refresher
by blackadder
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |