Re: add newline

2010-08-03 Thread Rob Dixon
Speed of execution is the last goal of all. First of all make your program functional and intelligible. Only after that, if you have problems with resources (including time, disk space, or processor) tune it to be more efficient. HTH, - Rob -- To unsubscribe, e-mail: beginners-unsubscr...@

Re: add newline

2010-08-03 Thread C.DeRykus
On Aug 3, 7:10 am, chas.ow...@gmail.com ("Chas. Owens") wrote: > On Tue, Aug 3, 2010 at 09:47, Chas. Owens wrote: > > On Tue, Aug 3, 2010 at 08:44, Shawn H Corey wrote: > >> On 10-08-03 06:43 AM, Rob Coops wrote: > > >>> Third you could of course when you are printing the values from the array >

Re: add newline

2010-08-03 Thread Chas. Owens
On Tue, Aug 3, 2010 at 09:47, Chas. Owens wrote: > On Tue, Aug 3, 2010 at 08:44, Shawn H Corey wrote: >> On 10-08-03 06:43 AM, Rob Coops wrote: >>> >>> Third you could of course when you are printing the values from the array >>> add the linefeeds: >>>  print join("\n", @myarray); >>> or >>>  for

Re: add newline

2010-08-03 Thread Chas. Owens
On Tue, Aug 3, 2010 at 08:44, Shawn H Corey wrote: > On 10-08-03 06:43 AM, Rob Coops wrote: >> >> Third you could of course when you are printing the values from the array >> add the linefeeds: >>  print join("\n", @myarray); >> or >>  foreach my $value ( @myarray ) { >>   print $value . "\n"; > >

Re: add newline

2010-08-03 Thread Shawn H Corey
On 10-08-03 06:43 AM, Rob Coops wrote: Third you could of course when you are printing the values from the array add the linefeeds: print join("\n", @myarray); or foreach my $value ( @myarray ) { print $value . "\n"; When printing, use a list; it's faster. print $value, "\n"; -- J

Re: add newline

2010-08-03 Thread Sharan Basappa
Thanks a lot, Rob ... On Tue, Aug 3, 2010 at 4:13 PM, Rob Coops wrote: > > > On Tue, Aug 3, 2010 at 12:26 PM, Sharan Basappa > wrote: >> >> In my program, I am building a text file f that also contains newlines >> irst into an array. >> I push every line to the array, but how do I add new lines

Re: add newline

2010-08-03 Thread Rob Coops
On Tue, Aug 3, 2010 at 12:26 PM, Sharan Basappa wrote: > In my program, I am building a text file f that also contains newlines > irst into an array. > I push every line to the array, but how do I add new lines to this text? > > Regards, > Sharan > > -- > To unsubscribe, e-mail: beginners-unsubscr

add newline

2010-08-03 Thread Sharan Basappa
In my program, I am building a text file f that also contains newlines irst into an array. I push every line to the array, but how do I add new lines to this text? Regards, Sharan -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org h