Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
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 the fire pops...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (1)
As of 2018-07-21 16:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?















    Results (449 votes). Check out past polls.

    Notices?