Hi,
 
In the example below, how do I pass @pets and @numbers into the subroutine so 
that
@animals = @pets  and 
@digits = @numbers.
Thanks
 
my @pets = ('dogs' , 'cats' , 'horses');
my @numbers = (1..10);
 
&study (@pets , @numbers);
 
sub study {
 
     my (@animals, @digits) = (@_[0] , @_[1]);
 
     print "Animals = @animals\n";
     print "Digits = @digits\n";
}

Reply via email to