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 r...@cbord.com 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

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 r...@cbord.com wrote: AKA carriage return, it suggests you have DOS/Windows line endings instead of Unix. You can clean them up in the source

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,

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 r...@cbord.com 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

RE: No Output in Terminal

2010-10-01 Thread Bob McConnell
[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

Re: No Output in Terminal

2010-10-01 Thread Brandon McCaig
On Fri, Oct 1, 2010 at 1:07 AM, Chas. Owens chas.ow...@gmail.com 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

Re: No Output in Terminal

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

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. Owenschas.ow...@gmail.com 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

Re: No Output in Terminal

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

Re: No Output in Terminal

2010-10-01 Thread Chas. Owens
On Fri, Oct 1, 2010 at 18:56, Brandon McCaig bamcc...@gmail.com wrote: On Fri, Oct 1, 2010 at 1:07 AM, Chas. Owens chas.ow...@gmail.com 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).

No Output in Terminal

2010-09-30 Thread Mark
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; Permissions are set to 755. In a terminal application

Re: No Output in Terminal

2010-09-30 Thread Chas. Owens
On Thu, Sep 30, 2010 at 22:25, Mark herrpoe...@hailmail.net 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

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 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

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

Re: No Output in Terminal

2010-09-30 Thread Chas. Owens
On Thu, Sep 30, 2010 at 22:48, Mark herrpoe...@hailmail.net 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.

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 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 ord,

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 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

Re: No Output in Terminal

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

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