You can check whether *STDIN is a tty:
print -t *STDIN ? "Wow! A real person!\n" : "<p>I feel a distant presence . . .</p>";
After Compline,
Zaxo
In reply to Re: Telling if your script is running from web page or CLI
by Zaxo
in thread Telling if your script is running from web page or CLI
by dizzyg
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |