What is the exact link that viewreports2.pl generates and what happens when you click it? Links of directories in the subdirectory of 2014-07-24 directory
What happens if you manually enter that url in the browser? No links
What kind of files do the links point to? Directories
Do you have error handling in both of those scripts so that you can catch any/all errors and warnings i.e., do you have this in the scripts?
use warnings FATAL => qw(all);
I go the error this time i.e. Argument "." isn't numeric in numeric ne (!=) at /usr/share/perlproj/cgi-bin/viewreports2.pl line 55.