http://www.perlmonks.org?node_id=188571


in reply to Re: Caching images from RDBMS
in thread Caching images from RDBMS

Thank you so much for the simplest, fastest and works like a charm solution ;)

Here's the modified line that makes the trick:

print header(-type => 'image/jpeg', -Content_length => length $file, -expires => '+30d', ), $file;


$|=$_="1g2i1u1l2i4e2n0k",map{print"\7",chop;select$,,$,,$,,$_/7}m{..}g