Though i'd like to give you some tips if you want to keep on working on the script.
1. Don't put perl tarballs in /var/cache/apt/ (this dir is for debian packages, just dl it to /usr/local/src or smth
2. You can shorten this all by putting all the packages in one apt-get command, also add a:
and then use that as cmd like so:
3. Installing a perl module from command line can be done like this:
perl -MCPAN -e 'Geography::Countries Mail:DomainKeys'
this way all the dependencies will be installed as well.
4. Don't put scripts in /var/cache/apt/