Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Is there an isArray() in Perl?

by jdporter (Paladin)
on Mar 03, 2008 at 15:49 UTC ( [id://671669]=note: print w/replies, xml ) Need Help??


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!

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://671669]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (7)
As of 2024-04-16 11:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found