in reply to Re: Trying to join variables
in thread Trying to join variables

Ok, so after that I am going to have three different possible $file variables and depending on certain conditions i want to return one of the three to be passed into another sub rountine, how can I set it up so that I can pass in the return value from my file sub whatever it is, to another sub and do it all in the main program, Something along these lines:
#Run File sub routine that returns either file1, file2 or file3 #call next routine and pass in that returned value Next_sub(Whatever the returned value is..);
I am just looking for a way to do this without calling the next sub routine from the file sub conditional statements, because both the routines need to be as general and reuseable as possible. Thanks

Replies are listed 'Best First'.
Re: Re: Re: Trying to join variables
by Sifmole (Chaplain) on May 19, 2001 at 00:48 UTC
    # assume getFile returns the file1, file2, or file3
    Next_sub(getFile(@args));