A
Alexandre Bougakov
Hello,
I am using ActivePerl under Windows. I wrote a small script that
indexes a lot of *.pdf and *.doc files in a given directory using
external parsers.
It finds a file, and calls
system ("${doc2text_path}doc2text.exe -d cp1251 ${filename} >
${temp}output.txt");
the problem is that doc2text.exe "freezes" on some documents. It
outputs the text, but suddently stops, put Perl keeps waiting for it
to finish. I have to kill the script manually, delete the file that
caused the converter to stop and restart it all again.
The question is: can I make Perl to stop waiting for a called external
program to finish after one minute, for example, and than to kill the
frosen app., say "oops.." and to continue with the next commands?
Thanks in advance,
Sanja
I am using ActivePerl under Windows. I wrote a small script that
indexes a lot of *.pdf and *.doc files in a given directory using
external parsers.
It finds a file, and calls
system ("${doc2text_path}doc2text.exe -d cp1251 ${filename} >
${temp}output.txt");
the problem is that doc2text.exe "freezes" on some documents. It
outputs the text, but suddently stops, put Perl keeps waiting for it
to finish. I have to kill the script manually, delete the file that
caused the converter to stop and restart it all again.
The question is: can I make Perl to stop waiting for a called external
program to finish after one minute, for example, and than to kill the
frosen app., say "oops.." and to continue with the next commands?
Thanks in advance,
Sanja