Re: Accessing elements of an array passed by reference

2004-11-15 Thread Zeus Odin
"Colin Johnstone" <[EMAIL PROTECTED]> wrote ... > Gidday all, Hello. > I wish to access the elements of an array passed by reference > #get deploy list > my @$deployList = $task->GetVariable('deployList'); > foreach( @$deployList ){ > > } If $task->GetVariable('deployList') returns a referenc

RE: Accessing elements of an array passed by reference

2004-11-15 Thread Bob Showalter
Johnstone, Colin wrote: > Gidday all, > > I wish to access the elements of an array passed by reference Erm, OK. I don't see any passing by reference going on below... > > #get deploy list > my @$deployList = $task->GetVariable('deployList'); This is not valid Perl. If GetVariable returns an a

Re: Accessing elements of an array passed by reference

2004-11-15 Thread Edward Wijaya
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 } alternat