Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot

Fast Print using print function

by sathishselvam (Initiate)
on Jun 11, 2013 at 07:41 UTC ( #1038212=perlquestion: print w/replies, xml ) Need Help??
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 (Archbishop) 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.


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

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1038212]
Approved by Corion
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (5)
As of 2018-06-20 23:33 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (117 votes). Check out past polls.