in reply to search folder and delete certain files with perl
Maybe just use the system tool?
$ find /var/opt/xim/syslogs -maxdepth 1 -type f -name "Syslogd*" -mtim +e +0.5 -delete
(Run without -delete first, to make sure you picked the right files!!)
In Section
Seekers of Perl Wisdom