Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Why is the size even bigger after pack?

by ikegami (Patriarch)
on Nov 03, 2011 at 08:15 UTC ( [id://935600]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    use feature qw( say );
    
    ...
    my $packed = pack("w*",$num);
    say total_size($packed);
    Dump($packed);
    
  2. or download this
    24
    SV = IV(0x768010) at 0x768018    <-- See SVt_IV image below
    ...
      PV = 0x7d6520 "\207h"\0
      CUR = 2                        <-- Even though only 3 are needed,
      LEN = 8                        <-- 8 byte string buffer allocated
    
  3. or download this
    16
    SV = IV(0x51a100) at 0x51a104    <-- See SVt_IV image below
    ...
      PV = 0x5b4334 "\207h"\0
      CUR = 2                        <-- Even though only 3 are needed,
      LEN = 12                       <-- 12 byte string buffer allocated
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-03-29 11:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found