my @rrds = grep { /.*rrd$/ && -f "$logsdir/$_" } readdir DIR;
Why match zero or more characters in /.*rrd$/ when /rrd$/ would match the same thing with less work? Perhaps you meant /\.rrd$/?
$cmd = qq|$mv resize.rrd $logsdir/$rrd|; print "\tRenaming resized file, executing $cmd\n"; system($cmd) == 0 or die "Could not execute $cmd:$!\n";
Why not just use Perl's built-in rename function?
print "\tRenaming resized file, executing $cmd\n"; rename 'resize.rrd', "$logsdir/$rrd" or die "Could not rename +resize.rrd:$!\n";
In reply to Re: Resizing MRTG (RRDTool) logs en-masse
by jwkrahn
in thread Resizing MRTG (RRDTool) logs en-masse
by McDarren
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |