If you're talking in terms of objects, then using ref is incorrect. However, if you know the data you're passing around isn't going to be blessed, ref is just fine.
It'd be very nice if we had proper subroutine signatures, in which case the need for ref and isa would almost disappear. /me waits for Perl6.
----
I wanted to explore how Perl's closures can be manipulated, and ended up creating an object system by accident.
-- Schemer
: () { :|:& };:
Note: All code is untested, unless otherwise stated
In reply to Re: Is "ref $date eq 'ARRAY'" wrong?
by hardburn
in thread Is "ref $date eq 'ARRAY'" wrong?
by bronto
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |