On 10-12-05 05:58 PM, Brian Fraser wrote:
Well, I have no idea why it does what it does, but I can tell you how to
make it work:
s¶3(456)7¶¶$1¶x;
s§3(456)7§§$1§x;

For whatever reason, Perl is treating those character as an 'opening'
delimiter[0], so that when you write s¶3(456)7¶$1¶;, you are telling Perl
that the regex part is delimited by '¶'s, but the substitution part is
delimited by '$'s (think of something like s{}//;).

Hopefully someone here will be able to enlighten us both further.


$ perl -e's¶3(456)7¶¶$1¶x;'
Unrecognized character \xB6 in column 14 at -e line 1.
$ perl -Mutf8 -e's¶3(456)7¶¶$1¶x;'

You have to tell perl to use UTF-8. Add this line to the top of your script(s):

use utf8;

See `perldoc utf8` for more details.


--
Just my 0.00000002 million dollars worth,
  Shawn

Confusion is the first step of understanding.

Programming is as much about organization and communication
as it is about coding.

The secret to great software:  Fail early & often.

Eliminate software piracy:  use only FLOSS.

--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to