in reply to Re: Testing for definition of references
in thread Testing for definition of references

Yes, but if you follow what the perldoc says to do for regular arrays and hashes, but use it on a reference like:
if(@$arrayref)
and it is not defined, Perl will crash. This is what I'm trying to avoid.

Replies are listed 'Best First'.
Re: Re: Re: Testing for definition of references
by jsprat (Curate) on Jun 26, 2003 at 18:25 UTC
    I'm missing something here. You want to know if it is a reference, but you want to avoid using ref. Is there a reason why (besides not being a fan)? That's exactly what ref was designed to do.