Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

call an array in a sub

Status
Not open for further replies.

donny750

Programmer
Joined
Jul 13, 2006
Messages
145
Location
FR
hello ,

i've ths script with a sub;
in this sub i call an array but the not run good;
it returns me just the first element in the array;

I don't know why


Code:
my @tab = (... );

sub test {

my @mytab = shift;
..


}

&test(@tab);
[code]
 
resolved
just make this

Code:
my @mytab= @_;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top