You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
407 B
12 lines
407 B
#!/usr/bin/perl -w
|
|
|
|
use HTML::Entities;
|
|
use strict;
|
|
|
|
my $file = q{/home/leto/public_html/gitweb/indextext.html};
|
|
my $fortune = qx{/usr/games/fortune};
|
|
|
|
my $template = qq{<table><tr><td><img src="/gitweb/fortune-cookie.jpg"></img></td><td><xmp>\n%s\n</xmp></td></tr></table>\n};
|
|
open(my $fh, '>', $file ) or die $!;
|
|
printf $fh $template, encode_entities($fortune); # oh the entities!
|
|
close $fh or die $!;
|
|
|