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 :)
$,=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[$%++]}
|
|---|