After more research I found a function that I was looking for
sub is_const
{use B;B::SVf_READONLY & B::svref_2object(\$_[0])->FLAGS}
my $m="va"; our $n=3; my $u=undef; our $u2=undef;
for $x ($m, $n, $u, $u2, 4, "a", undef)
{ print "$x ";$x="VAR" unless is_const($x); print $x,"\n\n" }
but it too doesn't catch undef being passed it.
For what I'm doing now, I don't think I'll encounter this
condition. I think that japhy's is_const is 'better' than
the flags code that I came across - at least it's easier
to read.
What do you think?