To David & the group, Wags <[EMAIL PROTECTED]> wrote:
> What version of Perl are running and on what OS BBedit under Panther (OSX) Mac -- Berkeley BSD Unix perl v5.8.1 > > > > ## This Does what _not_ do what I would expect -- return the first 3 > > characters of type '\w' > > > > $tmp ="Joe Smore1qazxswedcvfrtgbnhytujmkilptyoXXXXt5000"; > > $tmp =~ s/(^\w{3})(.*)/$1/; > > print "$tmp\n"; > I ran it and it displayed Joe. I am running under Windows XP and Perl is > AS 5.8.4 ( 810 ). So the above code in Windows XP does what I expected? Not on my Apple G4! > Are you running with strict and warnings? No > Exactly what did your code that you ran look like? The above code returned $tmp containing : "Joe Smore1qazxswedcvfrtgbnhytujmkilptyoXXXXt5000" No change, that's what has me puzzled This is all the code... > You have given a paste, but what other code is there? > I would leave the ^ outside, but as stated, my print put out Joe. > > Wags ;) Regards, DG (kora musician / audiophile / webmaster @ www.coraconnection.com / Ft. Worth, TX, USA) -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>