Actually, you wouldn't want to do that, as the logfile would be written over every time the cronjob ran. You'd probably want to do something liike this:
date >> logfile && perl -d (your script here) 2>&1 >> logfile
The >> will append to the logfile rather than overwrite it, and the
2>&1 redirects
stderr to
stdout, assuming you are running bash. I'm not sure of the syntax for tcsh/ksh/csh/etc, but i'm pretty sure that there will be more useful debugging info in
stderr than in
stdout.
BlueLines
Disclaimer:
This post may contain inaccurate information, be habit forming, cause atomic warfare between peaceful countries, speed up male pattern baldness, interfere with your cable reception, exile you from certain third world countries, ruin your marriage, and generally spoil your day. No batteries included, no strings attached, your mileage may vary.