Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: How to pass two lists to a sub?

by Prior Nacre V (Hermit)
on Nov 05, 2004 at 12:06 UTC ( [id://405474]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    process_something($scalar1, $scalar2, \@list1, \@list2);
    
    ...
        my @list1 = @$ra_list1;
        my @list2 = @$ra_list2;
    }
    
  2. or download this
    my $rh_params = {
        scalar1 => $scalar1,
    ...
        my @list1 = @{$rh_params->{list1}};
        my @list2 = @{$rh_params->{list2}};
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-25 14:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found