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 argument
             # your items are separated without stress

  }
>>>>>Also, is there a better way to concatentate?
  You can use join like this:
   #!/usr/bib/perl -w
  use strict;

 my @arr=qw(item1 item2 item3); # u can put ur values into an array

  $arr=join "*,*",@arr;  # use join to ouput all values as a single scalar
value
                              # concatentate any separator u want, here I
used ","
                              # in red colour
 print $arr;

 Thanks

On Wed, Jul 27, 2011 at 9:03 PM, Tim Lewis <twle...@sc.rr.com> 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.  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.
>
>
> ---- Tim Lewis <twle...@sc.rr.com> 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 a way to do this.  Also, is there a better way to
> concatentate?
> >
> > Thanks for any suggestions on this.
> >
> > Tim
> >
> >
> > --
> > To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> > For additional commands, e-mail: beginners-h...@perl.org
> > http://learn.perl.org/
> >
> >
>
>
> --
> To unsubscribe, e-mail: beginners-unsubscr...@perl.org
> For additional commands, e-mail: beginners-h...@perl.org
> http://learn.perl.org/
>
>
>

Reply via email to