#!/usr/bin/perl

$mode = 0;

while (<STDIN>) {
	if (/^##KLUDGES##$|^###MESSAGE_END###$/ && $mode==0) {
		print "\nThe famous last word of today:\n------------------------------\n";
		open(fort,"fortune /usr/games/fortunes/lastwords |");
		while ($f = <fort>) { print $f; }
		close fort;
		print "\n";
		$mode=1;
	}
	print
}
