How can I pass two lists to a Perl subroutine?

Posted by Mike on Stack Overflow See other posts from Stack Overflow or by Mike
Published on 2010-05-21T16:57:40Z Indexed on 2010/05/22 15:51 UTC
Read the original article Hit count: 137

Filed under:
|
|

Is it possible to pass two lists to a sub in Perl, for example:

sub Foo {
 my(@list1,@list2) = @_;

}

I know I could make @_ two lists, with each sublist being the desired argument, I'm just wondering if there is a cleaner way

© Stack Overflow or respective owner

Related posts about perl

Related posts about function