By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,848 Members | 1,416 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,848 IT Pros & Developers. It's quick & easy.

Passing an array to another function

P: 5
hi
i have two functions and i stored the results of the first function in an array.
I have to use the output of the first function as the input of the second.
How can i do it??


Thanks in advance
Jan 25 '08 #1
Share this Question
Share on Google+
1 Reply


KevinADC
Expert 2.5K+
P: 4,059
generic example:

Expand|Select|Wrap|Line Numbers
  1. my @results = first_function();
  2. my @more_results = second_function(@results);
  3.  
  4. sub second_function {
  5.     my @array = @_;
  6.     #do something with @array
  7.     return(@array); # or return whatever is appropriate;
  8.  
Jan 25 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.