Ok, this thread is about a rotating script, I just named it ROT for attention, but still some what relevant to the subject. Ok, the script I'm using is a perl script, the problem is it can't find the dir, since it just keeps printing the alt as the image, the script is :
#!/usr/bin/perl
my $directory="/images";
my @files=(glob("$directory/*.jpg"),glob("$directory/*.png"),glob("$directory/*.gif"));
my $file=$files[rand @files];
print "Status: 302 Found\n";
print "Location: $file\n";
print "\n";
Should it be :
my $directory="./images"
Thanks for reading.
#!/usr/bin/perl
my $directory="/images";
my @files=(glob("$directory/*.jpg"),glob("$directory/*.png"),glob("$directory/*.gif"));
my $file=$files[rand @files];
print "Status: 302 Found\n";
print "Location: $file\n";
print "\n";
Should it be :
my $directory="./images"
Thanks for reading.
Last edited: