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

I'm used to doing this

exec >>$ 2>&1

In ksh and bash

And I know in perl I can do


$stdout = select(LOG)
   print "something\n";

But can I exactly mimic the ksh/bash redirect of stderr as well as stdout?
And do I need to? Does perl distinguish betwixt stdout and stderr? What does
"die" write to? (s'pose I ought to test that out and find out for myself) -
I guess I'm concerned about my silently-running script failing in some way
and anything going to stderr not being picked up in the logfile...

My script is actually running on Windoze using WInXP's awful task scheduler
rather than cron so I can't redirect via the calling command... and anyway,
I prefer my scripts to be fully in control of things - I don't like hunting
down a long complicated chain of things that affect my proggies' execution.

As ever, all help gratefully received.



Site Timeline