Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Checking if a variable is an array

by ferreira (Chaplain)
on Jun 28, 2007 at 13:35 UTC ( [id://623886]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $data = XMLin( $xml, ForceArray => [ qw(Layer) ] )
    
  2. or download this
    my $layers = $data->{Capabilities}->{Layer};
    for my $layer ( ref $layers eq 'ARRAY' ? @$layers : ( $layers ) ) {
        # do something to each Layer
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2024-04-23 20:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found