run application from perl nonblocking?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I want to run a command from a perl script in nonblocking mode.
So lets say we have this routine:

sub EndOfBody {
($self, $mailid) = @_;
#Here I want to run: "C:/parser.exe $mailid"
return(250 , "Mail has been delivered!");

At the comment, I want to run the command
C:/parser.exe $mailid

and then instant after launching the command, continue with returning
250 "Mail has been delivered!" while parser.exe is running. (and the
parser.exe should continue running even when the script with the
EndOfBody subroutine has exited)

Since when receiving mails with large attachment, I need to be able to
parse the mail in the background and extract all attachments to a
separate folder, without causing the client to the SMTP server to

parser.exe may return something, but it isnt anything useful, so its
no need to take care of the return value from parser.exe

Re: run application from perl nonblocking?

Quoted text here. Click to load it

perldoc -q background


The Earth is degenerating these days. Bribery and corruption abound.
Children no longer mind their parents, every man wants to write a book,
and it is evident that the end of the world is fast approaching.
       Assyrian stone tablet, c.2800 BC              

Site Timeline