in reply to Re: Is an SV and IV or a PV or an NV or a UV? How can I tell?
in thread Is an SV and IV or a PV or an NV or a UV? How can I tell?

This will give the answer without the superfluous "B::" prefix:

use feature qw( say ); use B qw( ); my ($f,$g) = (333,"xyz"); say B::class(B::svref_2object(\$f)); say B::class(B::svref_2object(\$g));
IV PV

Note that this returns the SV *type*. It can return "PV" even if the scalar has no PV.

use feature qw( say ); use B qw( ); $_ = 333; "".$_; $_ = undef; say B::class(B::svref_2object(\$_));
PVIV

This is what the OP asked, but he probably wants to know what the scalar *has*.