|
PERL Code
I have a code block ...
$cmd = "find $audit_dir -mtime +$days_to_keep -exec rm {} \\;";
unless(open(CMD, "$cmd |")){
$msg = "Error command : $cmd \n\n";
print_log $lgh,"$msg",1;
exit 1;
}
print_log $lgh, "Deleting physical files with Command : $cmd ", 1 if verbose;
while ($line=<CMD>) {
print_log $lgh, "Physical files older than $days_to_keep deleted from $audit_dir", 1 if $verbose;
}
after it executes the print_log , it's not going inside the while loop ..
what am I missing here ?
Thanks
|