in reply to unlink files

This is a good example of when to use Bash, the granularity of what Perl is giving you is unnecessary and causes one to overcomplicate the task; so there's no need to introduce it when the shell gives you much more direct access to what you're doing. You can do this with a short script that simply uses mysqldump and find.

Or if you want to get really clean, pipe the dump directly into gzip -c to get your sql.gz (no temporary files to clean up). gzip also can delete any files it's zipping, leaving you with just the .gz. Or if you have more than on, tar -cz. At least create yourself a .my.cnf file chmod'd 600 so you don't have to mess with password or put the password directly in the command (this shows up fully in the process list).

If you insist on using Perl for this, then at least make it interesting and use something like Archive::Tar::Builder to manage your dumps.

It's also perfectly okay to treat Perl scripts as utilities also that are piped together using Bash, some people tend to think you have to do it all in Perl as a monolithic thing. Perl works just as well to create small focused tools that are piped together (via STDIN and STDOUT) and managed with a Bash script.