Re: Add line feed to line

2011-08-03 Thread Rob Dixon
On 03/08/2011 20:02, Jim Gibson wrote: On 8/3/11 Wed Aug 3, 2011 9:41 AM, "Tim Lewis" scribbled: First Microsoft decides that Hungarian Notation is no longer a standard in VB; I am still going through withdrawal from that. Now camel Case is gone? I will adapt my programming to use the under

Re: Add line feed to line

2011-08-03 Thread Jim Gibson
On 8/3/11 Wed Aug 3, 2011 9:41 AM, "Tim Lewis" scribbled: > First Microsoft decides that Hungarian Notation is no longer a standard in VB; > I am still going through withdrawal from that. Now camel Case is gone? I > will adapt my programming to use the underscores. CamelCase is not gone. Per

Re: Add line feed to line

2011-08-03 Thread Shlomi Fish
On Wed, 3 Aug 2011 12:41:35 -0400 "Tim Lewis" wrote: > First Microsoft decides that Hungarian Notation is no longer a standard in > VB; I am still going through withdrawal from that. Now camel Case is gone? > I will adapt my programming to use the underscores. Thanks Shlomi. On a side > note,

RE: Add line feed to line

2011-08-03 Thread Tim Lewis
. -Original Message- From: Shlomi Fish [mailto:shlo...@shlomifish.org] Sent: Friday, July 29, 2011 7:13 AM To: Tim Lewis Cc: beginners@perl.org Subject: Re: Add line feed to line On Wed, 27 Jul 2011 15:19:56 -0400 Tim Lewis wrote: > I am attempting to add a line feed to the end of each l

Re: Add line feed to line

2011-07-29 Thread Shawn H Corey
On 11-07-29 07:15 AM, Shlomi Fish wrote: open my $output_fh, '>', $output_filename or die "Cannot open '$output_filename' for writing - $!"; binmode($output_fh); These can be combined into one statement: open my $output_fh, '>:raw', $output_filename or die "Could not open '$output

Re: Add line feed to line

2011-07-29 Thread Shlomi Fish
On Wed, 27 Jul 2011 16:03:32 -0400 Tim Lewis wrote: > I found an answer that I thought I would share. > > I am using ActivePerl on Windows server 2003. ActivePerl translates 0A as > CR\LF. That's the case for most Windows Perls. > The print statement was causing the issue. To stop this, I

Re: Add line feed to line

2011-07-29 Thread Shlomi Fish
On Wed, 27 Jul 2011 15:19:56 -0400 Tim Lewis wrote: > I am attempting to add a line feed to the end of each line. When I do this, a > carriage return is also added. My code lines are: > > $currentLine = $currentLine . "\x{0A}"; > $finalOutput = $finalOutput . $currentLine; > > There has to be

Re: Add line feed to line

2011-07-28 Thread Tim Lewis
Thanks! timothy adigun <2teezp...@gmail.com> wrote: > Tim, > >>check this if it answers ur #1 question: > #!/usr/bib/perl -w > > $\="\n"; # with output record separator used you don't ve to use ># $currentLine = $currentLine . "\x{0A}"; in ur code again > > my @arr=

Re: Add line feed to line

2011-07-28 Thread Emeka
Timo, #!/usr/bib/perl -w What is "-w" doing here? Emeka On Wed, Jul 27, 2011 at 9:59 PM, timothy adigun <2teezp...@gmail.com> wrote: > Tim, > >>check this if it answers ur #1 question: > #!/usr/bib/perl -w > > $\="\n"; # with output record separator used you don't ve to use >

Re: Add line feed to line

2011-07-27 Thread timothy adigun
Tim, >>check this if it answers ur #1 question: #!/usr/bib/perl -w $\="\n"; # with output record separator used you don't ve to use # $currentLine = $currentLine . "\x{0A}"; in ur code again my @arr=qw(item1 item2 item3); for(@arr){ print $_; # used $_ default argu

Re: Add line feed to line

2011-07-27 Thread Tim Lewis
I found an answer that I thought I would share. I am using ActivePerl on Windows server 2003. ActivePerl translates 0A as CR\LF. The print statement was causing the issue. To stop this, I added binmode to my file handle: open(OUTPUT,">$outputFileName"); binmode OUTPUT; It works great now.