Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: calling awk one liner from perl

by Rahul6990 (Beadle)
on Apr 22, 2013 at 07:12 UTC ( #1029809=note: print w/ replies, xml ) Need Help??


in reply to calling awk one liner from perl

Hi vroom, sed and awk cannot handle large amount of data, because they try to load the entire file at once into the memory and then apply the changes on them. Even if you call a awk command from perl script same thing happen.

But here is an example that you can try:

$command = <awk command>; system($command);


Comment on Re: calling awk one liner from perl
Download Code
Re^2: calling awk one liner from perl
by hippo (Curate) on Apr 22, 2013 at 13:51 UTC
    sed and awk cannot handle large amount of data, because they try to load the entire file at once into the memory and then apply the changes on them

    That is quite some assertion. I'd be interested (and very surprised) to see any evidence which backs this up.

Re^2: calling awk one liner from perl
by runrig (Abbot) on Apr 22, 2013 at 15:33 UTC
    ... because they try to load the entire file at once into the memory and then apply the changes on them.

    No, they don't. Perhaps you're saving too much data into an associative array? Anyway, that's enough guessing games w/o any actual examples.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1029809]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (9)
As of 2014-08-23 14:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (174 votes), past polls