in reply to Re: How was my script ran?
in thread How was my script ran?

That's a good idea, but if the script is being called by cron or at (or Windows Scheduled Event :o), will STDIN be a tty? I have no idea, come to think of it, as what STDIN would be identifiable in that circumstance. Or is the point moot -- will this script never be automated?

LAI
:eof

Replies are listed 'Best First'.
Re: Re^2: How was my script ran?
by jsprat (Curate) on Mar 05, 2003 at 17:57 UTC
    Yeah, I thought of that too. Another one - if the script gets its input via a pipe, the -t will return false. I'm sure there are more scenarios that we haven't thought of yet.

    BTW, windows actually starts a shell for a perl script, so -t returns true. On FreeBSD (and other *nix, I'm sure), -t returns false for a cron job.