AKA carriage return, it suggests you have DOS/Windows line endings instead of Unix. You can clean them up in the source files with the dos2unix or tr filters. The latter looks something like this:
$> tr "\r\n" "\n" < bad.pl > good.pl Bob McConnell -----Original Message----- From: Parag Kalra [mailto:paragka...@gmail.com] Sent: Thursday, September 30, 2010 11:38 PM To: Mark Cc: beginners@perl.org Subject: Re: No Output in Terminal Thats ^M character. You can get rid of them using vi: :%s/^M//g Cheers, Parag On Thu, Sep 30, 2010 at 8:26 PM, Mark <herrpoe...@hailmail.net> wrote: > 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 > -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/