That part I posted about STDIN was the only relevant part of the perl script. I event tried it with only that and a line to print to log. However, it turned out at some point I fixed the Shell Script, but at that point the perl script had gotten overwritten by log information. It is all working now.