question about perl 5.6
Paul Johnston
paulj at ccl.umist.ac.uk
Mon May 13 12:00:45 CDT 2002
Question
I wish to generalise the scheme below:
s/d/pack("U",100)/eg;
s/e/pack("U",101)/eg;
s/f/pack("U",102)/eg;
i.e. take a web page with unicode character codes i.e. arabic and create a file
with the actual unicode characters.
So I think it should be like:
s/&#([0-9]*)/pack("U",\1)/eg;
However this does not work, something to do with when the parentheses are passed
to \1 and this is evaluate I think?
Any ideas, please note not all versions of perl support pack("U",value)
Paul Johnston
Unix System Admin
Language Engineering
UMIST
Tel 0161 200 3089
Fax 0161 200 3099
--
You are currently subscribed to manchester-pm-list. To unsubscribe, send the following message to majordomo at happyfunball.pm.org:
unsubscribe manchester-pm-list
More information about the Manchester-pm
mailing list