Its not related to perl but realy something that all the *nix user would know. Its just setting up the environment variables and executes a sql file named /print/production/bin/purge.sql
And then sleeps for 30 seconds and mails the details to a group .