I have a subroutine that begins with a message ("Processing...") and then proceeds to perform several gigs worth of file transfer via system calls. Basically:

sub transfer {
        print "Processing...\n";
        foreach $e (@array) {
                print "file $e\n";
                system "cp $e"; #or whatever
        }
        print "...done\n";
}

Unfortunately, perl completes the entire (minutes long) routine BEFORE it prints anything, so when the whole thing is done, suddenly the "Processing...file X...file Y...file Z...done" appears.

Why? and is there a way around this? I would like to know what is happening while it is happening, and not after it is finished.
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to