#!/usr/bin/perl
$dir = "path";
use File::Find;
find(sub{push(@files, $File::Find::name) unless -d}, $dir);
foreach $file (@files) {
open(FILE, $file);
foreach $line () { push(@file, $line); }
close(FILE);
$data = join("", @file);
@file = ();
$data =~ s/\t/ /g;
open(FILE, "> $file");
print FILE $data;
close(FILE);
}
|