On 9/30/10 10:59 PM, Chas. Owens wrote:
The only thing I can do to reproduce what you are seeing is to place a
control-d (aka ASCII character 4) in the file.  Try saying this

echo 'print "hello\n"' | perl -

If that works, then try this:

perl -nle 'print for grep { $_<  31 or $_>  126 } map ord, split //' t.pl

It will tell use what control characters may be lurking in that file of yours.

AH HA! When you mentioned control characters, I wondered if my text editor -- BBEdit -- was causing the problem. It must have been, because when I copy & pasted the code from BBEdit into Emacs, suddenly the script ran perfectly in iTerm. Problem apparently solved. Thanks, everyone!

- Mark

Reply via email to