in reply to Calculating a checksum on a reference

Hi,

Is dereferencing okay? You can checksum like:
# you can find this documented in various places # I believe its known as a System V sum. my $sum = unpack( "%32C*", $string ) % 65535 ;
So, if you had a reference, you could just dereference it.
my $sum = unpack( "%32C*", $$str_ref ) % 65535 ;
Peace,
Bro. Doug :wq

Replies are listed 'Best First'.
Re^2: Calculating a checksum on a reference
by ikegami (Patriarch) on Mar 20, 2007 at 03:39 UTC
    The OP asked about array or hash references, not references to strings. Seems to me he wants to checksum the array's or hash's content.