use strict; use LWP::Simple; use HTTP::Daemon; use HTTP::Status; open(CSS,"style.css") || die "CSS Error: $!"; my $css = join("",); close(CSS); &serve; #well it was going to be bigger than this originally you see sub serve { my $d=HTTP::Daemon->new(LocalAddr=>'localhost', LocalPort=>'82', Reuse => '1') || die "Cant Spawn: $!"; my $c; while(1) { $c =$d->accept; my $r = $c->get_request(); my $url = $r->uri->as_string; my $content; if ($url !~ /style.css$/i) { $url =~ s|^(http://).+?/(.*)$|$1www.perlmonks.org/$2|i; $content = get $url; $content =~ s|\nnew(); $response->content($content); $c->send_response($response); $c->close; } }