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

Re: How to access an Array Element

by chargrill (Parson)
on Apr 03, 2006 at 19:30 UTC ( [id://541004]=note: print w/replies, xml ) Need Help??


in reply to How to access an Array Element

barrycarlyon: you appear to have been working at this problem for some time now.

Try posting some more of the code from your program, giving us a fully funcational version that operates on <DATA> or some other construct, with expected input, and output, as well as actual output (containing the problem you're running into) so that we can see exactly what you're doing, so perhaps we can help you better.

If this node is related to your other node, then perhaps all you need to do is:

$search = ( split / /, $data ); # or $search = @$data[2]; # or $search = $results[2];

... but really, it's hard to give an accurate answer to your queries without a better defined question! :-)

The way this particular question is worded, it looks like you've got a hash whose value you'd like to get, which would be written as:

$search = $array_name{'content'};

Please, help us help you a bit better :)



--chargrill
$,=42;for(34,0,-3,9,-11,11,-17,7,-5){$*.=pack'c'=>$,+=$_}for(reverse s +plit//=>$* ){$%++?$ %%2?push@C,$_,$":push@c,$_,$":(push@C,$_,$")&&push@c,$"}$C[$# +C]=$/;($#C >$#c)?($ c=\@C)&&($ C=\@c):($ c=\@c)&&($C=\@C);$%=$|;for(@$c){print$_^ +$$C[$%++]}

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (5)
As of 2024-04-18 19:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found