Is this in the above script or in the "my_test_file" script?
If it's the above script, line 1 is the #!/bin/ksh line.
Maybe you have a null byte in that line. The kernel doesn't seem to mind; it
opens the interpreter fine and hands it the script. But then ksh has to read
that script, including the #!/bin/ksh comment.
Maybe the lexical scanning logic in that shell doesn't like null bytes in the
syntax, even if they are commented out?
If you run "od -t x1 <above-script>", do you see any null bytes?