kb2yht has asked for the wisdom of the Perl Monks concerning the following question:

SO, I have directory full of JPEG images used as a large part of the Human interface "GUI " to to a MySQL query output, Embeded in a page. I can not make the dir accessable to the world via the web server, But a script running on the server can easly see the images, Is there a way to use a small CGI to open and send the image to the cliant? like....
 <img src=$myscript/$image_filename>
in as the img source , then have

#!/usr/local/bin/perl -W use CGI qw/:all/; my $query = CGI::new(); my $file = $query->path_info(); open ( IMAGE, $file ); while ( <IMAGE> ) { print $_; } exit ;

to open and then print the file ?? , This does not work, but I think its only because of an over sight in the perl or in the way I'me pointing the WEb-cliant to the link.
Perhaps One of the older and wiser Monks may have a answer, ( or maby just a Wiser monk will thel me to FIYS )
Bill Nolan,