in reply to Re^2: match substitution
in thread match substitution

Thanks for pointing it out. You are right, I get the same when I turn the warnings on!
UPDATE:
use strict; use warnings; #use utf8; my $str = "725-275 is an entry - and will be at 423-569 -but- not at 0 +12-457."; print "before: $str\n"; $str =~ s/([0-9]{3})-([0-9]{3})/$1\x{2014}$2/g; print "after: $str\n" produces: before: 725-275 is an entry - and will be at 423-569 -but- not at 012- +457. after: 725—275 is an entry - and will be at 423—569 -but- not at 012—4 +57.

Replies are listed 'Best First'.
Re^4: match substitution
by ShayShay (Acolyte) on Jan 27, 2010 at 12:25 UTC
    Wow! Thanks!