Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Windows 7 Remove Tabs Out of Memory

by Rudolf (Monk)
on Jul 31, 2012 at 19:33 UTC ( #984651=note: print w/ replies, xml ) Need Help??


in reply to Windows 7 Remove Tabs Out of Memory

Tim, I suggest looping through the file yourself in any case, its fairly simple: and using tr/// instead of s/// is an improvement.

open(OLD,'<','large_file.txt') or die "$!";#open old file my @old_file_contents = <OLD>; close(OLD); open(NEW,'>','test.txt') or die "$!";#open new file foreach my $line(@old_file_contents){ $line =~ tr/\t//d; #delete tabs print NEW $line; #print line to new file } close(NEW);

UPDATE: I see your replacing them with a space, so maybe just try

$s =~ tr/\t/ /;


Comment on Re: Windows 7 Remove Tabs Out of Memory
Select or Download Code
Re^2: Windows 7 Remove Tabs Out of Memory
by tallums (Initiate) on Jul 31, 2012 at 19:59 UTC

    Thanks Rudolf! Thanks everybody!

    Rudolf's suggestion works for me :)

    Tim

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (3)
As of 2014-10-22 04:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    For retirement, I am banking on:










    Results (112 votes), past polls