Instead of the --- in the following match
$_ = "Señor";
s~([\x80-\xFF])~$1---~g;
print; # Señ---or
I want to evaluate ord($1) and then look up in a table that will give
me "0x00F1" so that I can print Señ[0x00F1]or.
I know it must be possible to do this without having 128 different
patterns, but I'm at a loss as to where to start. I'm still struggling
to learn how to use map and tr. Can someone please point me in the
right direction.
JD
- Re: [MacPerl] Evaluating within a pattern John Delacour
- Re: [MacPerl] Evaluating within a pattern Paul McCann
- Re: [MacPerl] Evaluating within a pattern Ronald J Kimball
- Re: [MacPerl] Evaluating within a pattern Paul McCann
- Re: [MacPerl] Evaluating within a pattern John Delacour
- Re: [MacPerl] Evaluating within a pattern Chris Nandor
- Re: [MacPerl] Evaluating within a pattern John Delacour
