use warnings; use strict; use autodie; open my $fhi, '<', 'large_file.txt'; open my $fho, '>', 'test.txt'; while (<$fhi>) { s/\t/ /g; print $fho $_; }