cowrefcnt#
How many scalars share a copy-on-write buffer, as perl counts.
Synopsis#
use B::COW qw(cowrefcnt);
my $n = cowrefcnt($string);
What you get back#
The share count perl keeps in the last byte of the buffer, 0 for a string that shares a hash key’s buffer (those have no count), or undef when the value is not copy-on-write.