No such thing as a small change | |
PerlMonks |
Re: Re: print hash into scalarby rob_au (Abbot) |
on Dec 23, 2002 at 08:39 UTC ( [id://221827]=note: print w/replies, xml ) | Need Help?? |
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"))'
In Section
Seekers of Perl Wisdom
|
|