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

Re: Re: print hash into scalar

by rob_au (Abbot)
on Dec 23, 2002 at 08:39 UTC ( [id://221827]=note: print w/replies, xml ) Need Help??


in reply to Re: print hash into scalar
in thread print hash into scalar

I would strongly concur with the comments of grinder above. I would however add that care should also be taken with Storable with regard to the storage mechanism employed by this module for cross-platform compatibility.

If the deserialisation of stored information is being performed across multiple platforms, it is important to employ the nstore routine for serialisation as this stores information in network order. Furthermore, double values are stored stringified to ensure portability, at the slight risk of losing some precision in the lowest order decimals.

Another feature of Storable which may also be of use in caching and information retrieval is the canonical representation of stored hashes. Normally, the elements of hashes are stored in the same order as they are stored internally by Perl (eg. pseudo-randomly). This allows serialised data to be compared in their frozen form which can be useful for caching serialised information.

 

perl -le 'print+unpack("N",pack("B32","00000000000000000000001000000101"))'

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-19 23:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found