On Mon, 15 Nov 2004 16:52:40 +1000, Johnstone, Colin <[EMAIL PROTECTED]> wrote:

Gidday all,

I wish to access the elements of an array passed by reference

#get deploy list
my @$deployList = $task->GetVariable('deployList');

foreach( @$deployList ){

print; #$_ worked automatically
}


alternatively you can assign a variable after foreach:

foreach my $var ( @$deployList ){

      print "$var\n";
 }


Please read- perldoc perlreftut perldoc perlvar

for additional info on those issues.

HoH

Regards,
Edward WIJAYA
SINGAPORE

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to