#!/usr/bin/perl # # pfrm v0.1 Jan 26, 2000 # by Philip Shuman pshuman at youthonfire dot com # # This is a quick little utility that will check your mail spool files # for any New or unread messages. $MailDir = "/home/pshuman/mail/"; # Don't forget the last slash! $listing = `/bin/ls $MailDir\_\*`; # check files that start with _ #$listing = `/bin/ls $MailDir\*`; # use this to check all files. @folders = (" ", split('\n', $listing)); foreach $folder (@folders) { $results = `frm -M -s new -s unread $folder`; if ($results ne "You have no new or unread mail.\n" && $results ne "You have no mail.\n" ) { $results =~ s/^/ /gm; if ($folder eq " ") { $folder = "INBOX"; }; print "**** $folder ****\n"; print "$results"; }; };