http://qs321.pair.com?node_id=671669


in reply to Is there an isArray() in Perl?

The reftype function in module Scalar::Util is good. It returns 'ARRAY' for any array reference, even if it's blessed.

Replies are listed 'Best First'.
Re: Answer: Is there an isArray() in Perl?
by swampyankee (Parson) on Mar 03, 2008 at 17:09 UTC

      Right. That makes it inappropriate as an isArray function, since it returns false for some arrays.

Re: Answer: Is there an isArray() in Perl?
by naikonta (Curate) on Mar 06, 2008 at 17:04 UTC
    If you work with normal array variables (not a reference ones), then you will never need such function. The sigil @ tells your right away that it's an array.

    Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!