in reply to Can you determine the number of References to a value?

Lee,

In addition to wog's suggestion of Devel::Peek, why not have some fun with Inline:

#!/usr/bin/perl use Inline C; $ref = 1; $refa = \$ref; $refb = \$ref; print myrefcount( $ref ); __END__ __C__ int myrefcount( SV *a ) { return SvREFCNT( a ); }

-derby

Replies are listed 'Best First'.
Re: Re: Can you determine the number of References to a value?
by shotgunefx (Parson) on Sep 13, 2001 at 03:57 UTC
    Thanks!

    I've been meaning to play with inline. So much simpler than XS.

    -Lee

    "To be civilized is to deny one's nature."