Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

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 :)


Log In?

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

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2015-02-27 16:22 GMT
Find Nodes?
    Voting Booth?

    On my keyboard, Caps lock is:

    Results (449 votes), past polls