in reply to Re^5: showing an image downloaded with LWP::Simple
in thread showing an image downloaded with LWP::Simple

Thank you! Your explanation really helped!
  • Comment on Re^6: showing an image downloaded with LWP::Simple

Replies are listed 'Best First'.
Re^7: showing an image downloaded with LWP::Simple
by Melly (Chaplain) on Sep 08, 2006 at 20:35 UTC

    I use the following html to display an image via a perl script:

    <img src="randimage.cgi" border="2" alt="[mini-beast]">

    Where randimage.cgi is:

    #!/usr/bin/perl -wT use strict; my @files = glob("./jpegs/*.jpg"); print "Location: $files[int(rand @files)]\n\n";

    If that's any help...

    ...and, no, I don't know what the 'Location: ' and two newlines are for - I can only assume that they are normally output by a web-server as part of the protocol...

    ... okay, looked 'Location: ' up - it's a redirection command, which makes sense.

    Tom Melly, tom@tomandlu.co.uk