Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: How to pass two lists to a sub?

by gothic_mallard (Pilgrim)
on Nov 05, 2004 at 11:42 UTC ( [id://405470]=note: print w/replies, xml ) Need Help??


in reply to How to pass two lists to a sub?

Pass them by reference:

process_something($s1, $s2, \@l1, \@l2);

Check out perlref for an explanation on references.

--- Jay

All code is untested unless otherwise stated.
All opinions expressed are my own and are intended as guidance, not gospel; please treat what I say as such and as Abigail said Think for yourself.
If in doubt ask.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://405470]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (3)
As of 2024-04-25 20:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found