There are a few more things that need to be changed in the Perl script:
# Define Variables
$linkfile = The system path to the database containing the URLs.
The system path is not the same as a URL. If your domain name was yourdomain.com the system path would be /u/web/yourdo where "yourdo" is the account userID.
As such, the Define Variables section of the Links script would follow this format:
# Set Variables
$linkfile = "/u/web/<userid>/database.txt";
Be sure to substitute your domain name and userID in the example above. Although Matt's code is accurate, we recommend using the Perl Script Checker within your account Control Panel when installing any Perl script.