sub logroll { my $logs = new Logfile::Rotate (File => $_, <---- your problem is here