flushing problem with print



Hi everyone,

in a script I have a callback : 

sub Pause{
        print "pause\n";
        return 1;
}

if I launch 
        $ ./test.pl
I got
        pause
        pause
        ...

but if I launch
        $./test.pl | cat
or
        $./test.pl | tr "a-z" "A-Z"
the text is printed when I quit the program.

how can I flush the print ?



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]