laziness, impatience, and hubris | |
PerlMonks |
Re: Detecting interactive/non-interactive shellby mifflin (Curate) |
on Jul 03, 2005 at 18:17 UTC ( [id://472047]=note: print w/replies, xml ) | Need Help?? |
I think you can use the "-t FILEHANDLE". From perlfunc: -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 Section
Seekers of Perl Wisdom
|
|