muchas gracias monoswim, pero no se si depronto es la expresion regular o mi programa
Código PHP:
$startDirectory = "";
$extension=".txt";
$extension= "\\".$extension;
use File::Find;
find(&runMain, "$startDirectory");
sub runMain {
if (/$extension/ ) {
$file= $_;
next unless (-r $file);
open(PAGE,"$File::Find::name") || die "no puede abrir $file";
while(<PAGE>){
$thisPage= $thisPage . $_;
}#while
close(PAGE);
$thispage=~ s/r|n//g;
open(PAGENEW,">$File::Find::name") || die "No puede escribir el nuevo archivo a $file";
print PAGENEW $thisPage;
close(PAGENEW);
$thisPage="";
}#
}#
Que puede ser? muchas gracias