in reply to Re^3: Display DIR files and output in html to select a file
in thread Display DIR files and output in html to select a file

So, what's the problem? "$fileDir/$file". Or, if you want to do it right:
use File::Spec::Functions; ... catfile($fileDir, $file) ...
or even better, use glob instead of readdir...