Sep 28, 2007, 8:13 AM
Post #1 of 4
STDERR when perl script is called from a shell script
I've done a search for STDERR on the forum and can't find a mention of this question - it is possible it is a non-question.
I have a perl script which is being called from a sed script - although I have die commands in the script, when there is a problem, I can't find a mention of the error in the log to which the sed script writes its errors and noises.
Should I expect my output to turn up in the shell's error log, or is there somewhere else it goes? Is it possible that the sed script has been redirected to a specific place and the perl is writing somewhere else? If I grep for perl in /var/log direcctory, there is no mention of anything perl other than from the xferlog (which is detailing ftp comings and going to a directory called perl).
Can I also ask - Even if you don't use -w, die should still write out shouldn't it?
If there is something weird going on with the setup of the system, is there a way for me to redefine STDERR to my own local error file?
Sorry that it's a bit of a ramble, but it's a bit of a fact-finding query more than a straightforward question.
Thanks for reading.