-t Filehandle is opened to a tty.If you test STDIN (or maybe STDOUT) with -t and it returns false you should be running from a cron. I think. If you have the perl cookbook i think there is a recipe on this. I don't have it with me. Maybe someone else does.
Formatting fixed by holli
In reply to Re: Detecting interactive/non-interactive shell
by mifflin
in thread Detecting interactive/non-interactive shell
by kosun
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |