http://www.perlmonks.org?node_id=874417


in reply to Re^2: Resizing MRTG (RRDTool) logs en-masse
in thread Resizing MRTG (RRDTool) logs en-masse

Also,  /.*rrd$/ will match both of the strings  "rrd" and  "rrd\n" so perhaps you should use  /.*rrd\z/ instead.

Or perhaps even:  'rrd' eq substr( $_, -3 )