Perl 5.8.0 comes with Scalar::Util. One of the subroutines provided by this module is reftype(). reftype() is superior to UNIVERSAL::isa() in this context. For blessed or non-blessed array references, reftype() will always return 'ARRAY'.
Personally, I plan to use Scalar::Util::reftype() quite a bit in cases where I used to use UNIVERSAL::isa().
In reply to Re: Re: Re: Re: Re: Context aware functions - best practices?
by MarkM
in thread Context aware functions - best practices?
by Aristotle
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |