Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^7: Understanding pack and unpack changes for binary data between 5.8 and 5.10

by squentin (Sexton)
on Mar 13, 2009 at 21:26 UTC ( #750525=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $p=pack "V/a*", $s;
    my $l=length $p;
    
  2. or download this
    use Encode qw/encode/;
    my $p=pack "V/a*", encode('utf8',$s);
    my $l=bytes::length $p;
    # using bytes::length just to be sure, $p shouldn't have its utf8 flag
    + on, but in case it does...
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://750525]
help
Chatterbox?
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2017-10-17 13:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (232 votes). Check out past polls.

    Notices?