Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 1a85052834
Fetching contributors…

Cannot retrieve contributors at this time

executable file 24 lines (16 sloc) 0.45 kb
#!/usr/bin/perl -T
use strict;
use warnings;
print "Content-Type: text/html; charset=UTF-8\r\n\r\n";
my $dir = '/var/www/';
opendir my $DIR, $dir
or die "Cannot open dir '$dir': $!";
my @files = grep !/^\./, readdir $DIR;
closedir $DIR;
my $fn = @files[rand @files];
open my $file, '<:raw', "$dir$fn"
or die "Cannot open '$dir$fn' for reading: $!";
binmode $fn;
print while <$fn>;
close $file;
# vim: ft=perl
Jump to Line
Something went wrong with that request. Please try again.