my input = a directory in which I stored a certain amount of text files downloaded by some newsgroups;
my desired_process = to clean all the files and copy them all in another directory;
my desired_output = another directory in which there are all cleaned files;
my problem = my script doesn't run (I suppose: there's no output and top command line says that perl does not use the processor);
my request = where I mistake?
thanks a lot,
all'adr
~~~~~~~~~~~~THE SCRIPT~~~~~~~~~~~~~~~~~~~~
#!/usr/bin/perl -w use strict; my $testo;
@ARGV = <original_ones/*.txt>;
while(<>){
tr/\015\012/\n/s;
tr/\=\"\*\^\_\-\+\' //s;
s/Newsgoups: it\..+|Subject: .+|Date: .+|Message-ID: .+|References: .+|
Date: .+//g;
s/(\w\')/$1 /g;
$txt .=$_;
if ( eof ) {
$txt =~ s/(http:\/\/)?(\w){3,}(\.(\w(\-)?)+)+\.(\w){2,3}((\/)(\w)+((\
.)(\w){1,5})*((\?)(\w){1,32}(=)(\w){1,32})*)*/ URL /g;
$txt =~ s/[0-9]+/ /g;
$txt =~ tr/\n\r\f\t //s;
# here start problems, I suppose
open (ACTUAL, ">-" . "cleaned_ones/$ARGV") || die "I can't open $ARGV because $!\n";
print $txt;
close ACTUAL;
$txt = "";
}}
print "DONE.\n";
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]