vroom has asked for the wisdom of the Perl Monks concerning the following question:

Does anyone know whether it is possible to get the reference count for a specific variable or object in Perl?

Replies are listed 'Best First'.
Re: Reference Counts
by japhy (Canon) on Jan 12, 2000 at 08:39 UTC
    The Devel::Peek module, which can be employed as such:
    use Devel::Peek 'SvREFCNT'; use CGI; $q = new CGI; $refcount = SvREFCNT($q); print "\$q has $refcount references\n";