HomePage RecentChanges Contattami Random Page Le mie foto Il mio Blog RSS feed

randombg.cgi


#!/usr/bin/perl

use strict;
use warnings;

# your __PATH__ here :)
my @bg = <../*_bg.jpg> ;

print "Content-type: image\/jpeg\n\n" ;

open IN, "$bg[int(rand(@bg))]" ;

while(<IN>) {
        print;
}

close IN;