perl - understand process status and continue the code execution

Hello, I need advice on how to check if started processes are finished in perl, here's explanation :
OS is RHEL 4, perl -v = "This is perl, v5.8.0 built for i386-linux-thread-multi"

The logic of the script :

#!/usr/bin/perl

use warnings;
$param1 = $ARGV[0];
$param2 = $ARGV[1];
$param3 = $ARGV[2];

sub Help
{ help message goes here }
# some other subroutines follow

# main 
if (@ARGV < 3) {
        &Help; exit 1;
}
&cleanUp(); # pre-defined sub is being invoked here, stuff like $| = 1;
if ( $vars eq 'something' ) {
        &call_some_sub;
        } else {
        &call_another_sub;
}

Pretty simple, given that I'm not so good at perl, I wrote that for test.
So, what I'm basically doing is starting file transfers via ssh or other protocol with custom binary, and I need to check somehow that the transfers are done and then continue with other code executiom, in my case that will be another subroutine call, doing some static stuff. Quering the OS with "system ("pgrep pattern") every 1 second doesn't seem good, so I'm thinking of using fork() in order to trap the transfers' end. If that's the right way, I guess it should look like :

&start_transfers;
# somehow understand that they are done
&static_stuff_sub;

I've read the documentation for fork(); but I'm not sure if that's the right way. I guess my issue is that the file size vary from 10kb to 10Gb sometimes and I can't predict time to wait (using sleep for example). I'll appreciate any pointers.

Try waitpid().

waitpid - perldoc.perl.org

Thanks cbkihong, I saw that already, this would probably require fork(); but it won't work for me, at least in the way I wanted, I have arbitrary number of processes started via system command, and I can't use their PIDs, plus the execution of the subroutine call itself is successful, so I cannot do even :

wait &sub-call;
    if ($? == 0) {
        # do something else;
}

I think I'll wait for STDIN interaction while "chomp"-ing the input, this should ensure that processes / SSH transfers in the background are done, assuming someone is looking at the external log file in real time.