Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: How to access an Array Element

by davido (Cardinal)
on Apr 03, 2006 at 15:07 UTC ( [id://540938]=note: print w/replies, xml ) Need Help??


in reply to How to access an Array Element

Depending on whether you're dealing with an actual array, or an associative array (a hash), the answer could be either of the following:

my $search = $data[2];

...or...

my $search = $data{content};

...assuming your array or hash are named @data or %data.

And this assumes also that I understood your ambiguously worded question. If I misunderstood it, please rephrase it in a followup so we can gain a better understanding of your need.


Dave

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://540938]
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-20 02:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found