Passing an array to another function

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • narenshines
    New Member
    • Jan 2008
    • 5

    Passing an array to another function

    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
  • KevinADC
    Recognized Expert Specialist
    • Jan 2007
    • 4092

    #2
    generic example:

    [code=perl]
    my @results = first_function( );
    my @more_results = second_function (@results);

    sub second_function {
    my @array = @_;
    #do something with @array
    return(@array); # or return whatever is appropriate;
    }
    [/code]

    Comment

    Working...