SPUG: Word boundry regex treated differently by 5.6 and 5.005033

Ben Burnett benwa at ocentrix.net
Wed Apr 25 14:35:04 CDT 2001


Hey all,

I noticed something that seems strange.  I ran the following
script on two machines.  One of them running 5.00503 and one
running 5.6 (full details attached) and got two different
outputs.

--<script>--
#!/usr/bin/perl

use strict;

my $text = "Charles Bronson";

$text =~ s/\B\w//g;

print "here it is: $text\n\n";
--</script>--

output on 5.6 was:	here it is: Cals Bosn
output on 5.00503 was:	here it is: C B

I appears as though 5.00503 is getting rid of all \w
characters in the string that aren't preceded by a word
boundary(which is what I expected), while 5.6 is removing
every other \w character in each word.
I couldn't see anything obvious in perldelta that would
indicate that the two versions should treat this
differently.  Does anyone know why this might happen?

- Ben

P.S. Joydesk doesn't lend itself well to pasting wide lines
of text so i've attatched the full details of my perl
installs.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 5_00503-details.txt
Type: application/octet-stream
Size: 1756 bytes
Desc: not available
Url : http://mail.pm.org/archives/spug-list/attachments/20010425/3f070a79/5_00503-details.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 5_6-details.txt
Type: application/octet-stream
Size: 2256 bytes
Desc: not available
Url : http://mail.pm.org/archives/spug-list/attachments/20010425/3f070a79/5_6-details.obj


More information about the spug-list mailing list