G
Gandu
Could some Perl guru please help me? I have a very simple script to
remove
contents of the mozilla cache. It runs, but does nothing, the cache
remains
full as before. Could someone please point what I am doing wrong? The
file
is below:
#!/usr/bin/perl
$directory_name = '.mozilla/gandu/uar30qwk.slt/Cache';
print "Opening directory ...: $directory_name\n";
opendir(the_dir, $directory_name) || die("Directory could not be
opened");
@filelist = readdir(the_dir);
foreach $f (@filelist){
unless(($f eq ".") || ($f eq "..")){
printf("Removing ... $f\n");
unlink($f);
}
}
closedir(the_dir);
Thanks in advance for your help.
remove
contents of the mozilla cache. It runs, but does nothing, the cache
remains
full as before. Could someone please point what I am doing wrong? The
file
is below:
#!/usr/bin/perl
$directory_name = '.mozilla/gandu/uar30qwk.slt/Cache';
print "Opening directory ...: $directory_name\n";
opendir(the_dir, $directory_name) || die("Directory could not be
opened");
@filelist = readdir(the_dir);
foreach $f (@filelist){
unless(($f eq ".") || ($f eq "..")){
printf("Removing ... $f\n");
unlink($f);
}
}
closedir(the_dir);
Thanks in advance for your help.