Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: use bytes without breaking perl 5.005 or 5.004?

by bart (Canon)
on Sep 27, 2003 at 00:57 UTC ( [id://294583]=note: print w/replies, xml ) Need Help??


in reply to use bytes without breaking perl 5.005 or 5.004?

You can make a copy of the string that is marked as a byte string, even if the original string is UTF8, by doing this:
$bytes = pack "C0a*", $bytes_or_utf8;
That should work on pre-5.6 perls too — even though it won't do much.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://294583]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-05-26 20:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found