Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Hash of Arrays of Hashes Parsing

by tcf22 (Priest)
on Sep 17, 2003 at 19:47 UTC ( [id://292239]=note: print w/replies, xml ) Need Help??


in reply to Hash of Arrays of Hashes Parsing

Try this:
if(ref($reference) eq 'HASH'){ print 'Its a HASH reference'; ## Do Hash processing }elsif(ref($reference) eq 'ARRAY'){ print 'Its an ARRAY reference'; ## Do array processing }elsif(ref($reference)){ print 'Its a ' . ref($reference) . ' reference'; ## Handle invalid reference }else{ print "It isn't a reference"; ## Actual value, not a reference - do something }

- Tom

Replies are listed 'Best First'.
Re: Re: Hash of Arrays of Hashes Parsing
by SmokeyB (Scribe) on Sep 17, 2003 at 20:05 UTC
    Thanks Tom!

    That was perfect.

    Cheers!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (6)
As of 2024-03-19 09:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found