http://qs1969.pair.com?node_id=92943


in reply to Not Strictly A perl question.

That would almost work, provided you'd send the correct headers:
#!/usr/bin/perl -wT use strict; use CGI ':all'; my $q = new CGI; my $imagedir = "/path/to/images"; my $file = $q->path_info(); $file =~ s!^.*/!!gi; print header("image/jpeg"), do { local *ARGV; @ARGV = "$imagedir/$file"; <> };
Be sure to use taint checking on your path info, as you wouldn't want anyone to view files they shouldn't be viewing... :)

ar0n ]