server move broke perl script
Posted by: jesskilby
Posted on: 2009-10-19 15:46:00
Hi all, hoping somebody out there can help with this.
The recent server moves broke the perl script on one of my sites. Unfortunately, I wrote the script a good three years ago as part of an arts-based masters degree project and I have no idea how to follow the brief advice offered by DH to fix it. I was never a programmer to begin with, and I simply don't have the time to delve back into all this to get my head around it again. I'm not being lazy; I'm just insanely busy with other things at the moment (but would really like this project to continue working).
Here's what DH said:
Your perlmods directory uses libs from perl 5.8.4 (which was the older
version of perl on your old server), but your new server has perl version
5.8.8. You need to replace those old lib files with new ones for perl
version 5.8.8
Here are my questions:
Where can I download the new lib files? Which files do I need? And can I simply create a 5.8.8 folder in my perlmods/lib/perl directory via FTP and put the files in there?
Here is my script, if that's relevant:
#!/usr/bin/perl -wT
use strict;
use CGI ':standard';
print "Content-type:text/html\n\n";
use lib '/home/jesskilb/perlmods/share/perl/5.8.4';
use lib '/home/jesskilb/perlmods/lib/perl/5.8.4';
use File::Random qw/:all/;
my $dir = '/home/jesskilb/the-spam-oracle.com';
my $file = random_file(-dir => "$dir/infinity");
my @lines = random_line("$dir/infinity/$file", int(rand(3)) + 1);
my $randomlines=join("
",@lines);
open(OUTPUT,"$dir/results_template.html") or die "Can't open file\n";
my $line;
while ($line=<OUTPUT>) {
$line=~s/results go here/$randomlines/;
print $line;
}
close OUTPUT;
and here's what's currently in my 5.8.4 directory:
auto
Compress
Digest
perllocal.pod
Term
Want.pm
Any help would be MUCH appreciated. Thanks in advance!