Your readdir is failing. The first line needs to do something if it's going to be effective. You have it has:
opendir BUFFER, "images/" or "Serious Headache! $!";
But you probably want to do:
opendir BUFFER, "images/" or print "Serious Headache! $!";
You can also make it a fatal error by using die "Serious Headache! $!" and use CGI::Carp(fatalsToBrowser)..
Hope that helps. Also, you know what they say, while in Rome, make sure you have read and executable permissions on the Romans.
--jb
|