Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Reading array location

Reading array location

Reading array location

Greetings all,
I am working with a perl script and a module called IControl that gives me information about a Load Balancer

When I run my script and do a get_list() the value returned to $peer is ARRAY(0x2d7208c)

I don't know the next step for reading from that array location and was wondering if someone could guide me in the right direction


use SOAP::Lite;
use iControlTypeCast;
use MIME::Base64;
use myAuth ();
use vars qw($sUID $sPWD);
*sUID = \$myAuth::sUID;
*sPWD = \$myAuth::sPWD;

print "BEGIN TEST\n";
sub SOAP::Transport::HTTP::Client::get_basic_credentials {
print "In SOAP\n";
return "$sUID" => "$sPWD";
$SystemInfo = SOAP::Lite
-> uri('urn:iControl:LocalLB/Pool')
-> proxy("https://myaddress.com/iControl/iControlPortal.cgi");
$peeraddress = $SystemInfo->get_list();
$peer = $peeraddress->result;

print $peer;
print "\n";

RE: Reading array location

Just a guess here but as the fuinction is returning an array, try replacing


$peer = $peeraddress->result;
print $peer;



my @peer = $peeraddress->result;
print $peer[0];

and see what happens.


RE: Reading array location

$peer is a reference to an array. You should be able to dereference it as follows:
access to a single element: $$peer[index]
access to the whole array (and no.of elements): @$peer
last index of the array: $#$peer

http://www.xcalcs.com : Online engineering calculations
http://www.megamag.it : Magnetic brakes for fun rides
http://www.levitans.com : Air bearing pads

RE: Reading array location

Thanks All,
Yeah I finally got it figured out by doing the dereference. Thanks


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close