in reply to Re: Print inside SIGNALS
in thread Print inside SIGNALS

Thank everybody...

My actual perl program is huge to post it here. It does not use threads but it execute many external commands.

The Signal works and the Finish sub is executed.... it deletes temp files, close FHs, etc... everything works BUT print.. it does not print anything in STDOUT!

If the Finish sub is executed by the program itself (not via ALARM), then it prints to STDOUT normally..

I know that you are not magicians and that without the full code you cannot be accurate, but i would appreciate any clue or suggestion you may provide, please...

Replies are listed 'Best First'.
Re^3: Print inside SIGNALS
by ikegami (Patriarch) on Jul 16, 2018 at 16:51 UTC

    print returns false and sets $! on failure.

Re^3: Print inside SIGNALS
by shmem (Chancellor) on Jul 17, 2018 at 23:27 UTC

    Turn on autoflush (see perlvar):

    $| = 1;
    perl -le'print map{pack c,($-++?1:13)+ord}split//,ESEL'