Help for this page
foreach $logrecord (@errorcheck) { open (LOGFILE, "$logrecord"); ... } system ('page Mike') if $errorcount; print "$errorcount\n";