use B; $foo = qr/foo/; if ($foo->isa("Regexp")) {#check whether it is a Regexp object print "is a Regexp\n"; } else { print "is not a Regexp\n"; } print B::svref_2object($foo)->MAGIC->TYPE;#if it is not a sv ref, perl + will not allow you to call svref_2object
In reply to Re: Undefined regexp objects?
by pg
in thread Undefined regexp objects?
by diotalevi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |