in reply to Re-define Word Boundary?
Now assuming you want to actually match "a/c" in the case of your example, you are also changing the meaning of \w, and your new \b still isn't used, so you can just as well write:
while ($rec =~ m![\w/]+!g) { $word = $&; }
|
|---|