#!/usr/bin/perl # This script shows the last 5 played mame games, very linux centric, might work in cgywin? $cwd = $0; $cwd =~ s/last5\.pl//ig; chop($cwd); # remove / from end @lastfive = `uniq $cwd/favmame.log |tail -5`; print "Content-type: text/html\n\n"; foreach $line (reverse @lastfive) { $line =~ s/\"//; ($game, $rom) = split(/\"/, $line); $game =~ s/\"//ig; $rom =~ s/ //ig; chomp($rom); print "$game
\n"; }