in reply to Re^4: system function adds spurious characters to log file
in thread system function adds spurious characters to log file

The -t test checks if STDIN is coming from a tty or not, similar to POSIX::isatty. When you invoke your shell script automatically, redirect STDIN from /dev/null. Like this:

$ cat test.sh #!/bin/sh perl -le 'print "Interactive" if -t' perl -le 'print "Batch" unless -t' $ sh test.sh Interactive $ sh test.sh </dev/null Batch
print pack("A25",pack("V*",map{1919242272+$_}(34481450,-49737472,6228,0,-285028276,6979,-1380265972)))