sathishselvam has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I want to print/append the data (around 5 lakh record) in one new file using "print" function in PERL. is there any other way to speed up the print statement or any other utitilies available? now i'm using following method. Thanks in advance.

print $de_input "\nTarget Custom Groups:$target_section\n"

Replies are listed 'Best First'.
Re: Fast Print using print function
by davido (Cardinal) on Jun 11, 2013 at 08:58 UTC

    print is a general solution designed with simplicity in mind. It's about as fast as it can be while still maintaining its level of generality and simplicity of use. If we knew more about your specific needs and issues, we might be able to recommend a solution that is more appropriate for those specifics.

    Are you certain that print is your bottleneck? It's possible that it is, as IO is always a "usual suspect", but profiling might alert you to other areas you can focus on where there is more room for improvement.


    Dave

Re: Fast Print using print function
by vinoth.ree (Monsignor) on Jun 11, 2013 at 08:30 UTC