RE: No Output in Terminal

2010-10-04 Thread Bob McConnell
From: Brandon McCaig > On Fri, Oct 1, 2010 at 8:26 AM, Bob McConnell wrote: >> 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

Re: No Output in Terminal

2010-10-04 Thread Shawn H Corey
On 10-10-04 10:03 AM, Bob McConnell wrote: That's strange. I have been using the first version of this to get rid of ^M for about 26 years now with no problems whatsoever. I used it on Eunice (NCR Unix) long before I even knew Perl existed. I didn't think my memory was that far off. Actually, y

RE: No Output in Terminal

2010-10-04 Thread Bob McConnell
From: Shlomi Fish > On Monday 04 October 2010 14:45:57 Bob McConnell wrote: >> From: Brandon McCaig >> >> > On Fri, Oct 1, 2010 at 8:26 AM, Bob McConnell wrote: >> >> AKA carriage return, it suggests you have DOS/Windows line endings >> >> instead of Unix. You can clean them up in the source fil

Re: No Output in Terminal

2010-10-04 Thread Shlomi Fish
On Monday 04 October 2010 14:45:57 Bob McConnell wrote: > From: Brandon McCaig > > > On Fri, Oct 1, 2010 at 8:26 AM, Bob McConnell wrote: > >> 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

Re: No Output in Terminal

2010-10-01 Thread Chas. Owens
On Fri, Oct 1, 2010 at 18:56, Brandon McCaig wrote: > On Fri, Oct 1, 2010 at 1:07 AM, Chas. Owens wrote: > >> Okay, here is what I think happened: you were print a carriage return. > > I thought that Mac OS X used UNIX newlines though (though I'm not a > Mac user). :-/ So shouldn't "\n" be interp

Re: No Output in Terminal

2010-10-01 Thread Brandon McCaig
On Fri, Oct 1, 2010 at 7:01 PM, Brandon McCaig wrote: > decimal 126, of which the 10 or CF in the DOS/Windows newline should s/CF/LF/ :-[ -- Brandon McCaig V zrna gur orfg jvgu jung V fnl. Vg qbrfa'g nyjnlf fbhaq gung jnl. Castopulence Software -- To unsubscr

Re: No Output in Terminal

2010-10-01 Thread Shawn H Corey
On 10-10-01 06:56 PM, Brandon McCaig wrote: On Fri, Oct 1, 2010 at 1:07 AM, Chas. Owens wrote: Okay, here is what I think happened: you were print a carriage return. I thought that Mac OS X used UNIX newlines though (though I'm not a Mac user). :-/ So shouldn't "\n" be interpreted as an LF (

Re: No Output in Terminal

2010-10-01 Thread Brandon McCaig
On Fri, Oct 1, 2010 at 8:26 AM, Bob McConnell wrote: > 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

Re: No Output in Terminal

2010-10-01 Thread Brandon McCaig
On Fri, Oct 1, 2010 at 1:07 AM, Chas. Owens wrote: > Okay, here is what I think happened: you were print a carriage return. I thought that Mac OS X used UNIX newlines though (though I'm not a Mac user). :-/ So shouldn't "\n" be interpreted as an LF (0x0A) on Macs, the same as it would in other u

RE: No Output in Terminal

2010-10-01 Thread Bob McConnell
essage- 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 wrote:

Re: No Output in Terminal

2010-09-30 Thread Jim Gibson
At 11:26 PM -0400 9/30/10, Mark 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

Re: No Output in Terminal

2010-09-30 Thread Chas. Owens
On Thu, Sep 30, 2010 at 23:21, Mark 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 > >    It

Re: No Output in Terminal

2010-09-30 Thread Parag Kalra
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 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.

Re: No Output in Terminal

2010-09-30 Thread Mark
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 or

Re: No Output in Terminal

2010-09-30 Thread Mark
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 It did. then try this: perl -nle 'print for grep { $_< 31 or $_>

Re: No Output in Terminal

2010-09-30 Thread Chas. Owens
On Thu, Sep 30, 2010 at 22:48, Mark wrote: >  On 9/30/10 10:32 PM, Chas. Owens wrote: >> >> That is very odd, it should be working.  Just to make sure it is not >> some weirdness with iTerm (I use iTerm, so that shouldn't be the >> problem), try using Apple's Terminal.app instead. > > Same result

Re: No Output in Terminal

2010-09-30 Thread Mark
On 9/30/10 10:32 PM, Chas. Owens wrote: That is very odd, it should be working. Just to make sure it is not some weirdness with iTerm (I use iTerm, so that shouldn't be the problem), try using Apple's Terminal.app instead. Same result in Terminal.app. Also, I have Debian-Lenny running in Vir

Re: No Output in Terminal

2010-09-30 Thread Mark
On 9/30/10 10:38 PM, Parag Kalra wrote: Few questions/suggestions: Which shell are you on? i.e echo $SHELL /bin/bash whats the location of the perl binary: i.e which perl /usr/bin/perl Can you invoke the program using 'use strict' and let us know the output I've edited the test.

Re: No Output in Terminal

2010-09-30 Thread Parag Kalra
Few questions/suggestions: Which shell are you on? i.e echo $SHELL whats the location of the perl binary: i.e which perl Can you invoke the program using 'use strict' and let us know the output Can you try this: perl -e 'print "Hello World"' Cheers, Parag On Thu, Sep 30, 2010 at 7:25 PM, Mark

Re: No Output in Terminal

2010-09-30 Thread Chas. Owens
On Thu, Sep 30, 2010 at 22:25, Mark wrote: >  Hi. Perl newbie here. I'm on a MBP using Leopard (10.5.8). Perl is > pre-installed: /usr/bin/perl. > > I can't get a simple "Hello world" script to work. Here's the script (saved > as test.pl). > >    #!/usr/bin/perl -w >    print "Hello world!\n"; > >