I have a perl script that at the moment has a command line option -logfile <file> where it gets input by reading the <file> into the script. I would like to be able to check to see if stdin is being piped into my file so that I can change the flow of my script and get my input for the pipe instead.
When the -t option is used within a cron job the -t test evalutes to false or in my case it would make my script appear to be having input piped to it when in fact in my cron job I have -logfile <file> specified.