in reply to Re: subroutines!!!
in thread Problem while refactoring code into a subroutine (was: subroutines!!!)

If i wanted to return two arrays instead of one; e.g.
return (\@array, \@array2);
What is the syntax to using these arrays once they have been returned?? cheers

Replies are listed 'Best First'.
Re: Re: Re: subroutines!!!
by davorg (Chancellor) on Mar 25, 2003 at 12:16 UTC

    You do exactly the same thing. The values you get back will be array references so you access the elements using the -> syntax.

    --
    <http://www.dave.org.uk>

    "The first rule of Perl club is you do not talk about Perl club."
    -- Chip Salzenberg