YA resync with mainstem, including VMS patches from others
[p5sagit/p5-mst-13.2.git] / eg / scan / scan_messages
index 6f8ab2b..6cf0997 100644 (file)
@@ -1,10 +1,10 @@
 #!/usr/bin/perl -P
 
-# $Header: scan_messages,v 2.0 88/06/05 00:17:46 root Exp $
+# $RCSfile: scan_messages,v $$Revision: 4.1 $$Date: 92/08/07 17:20:37 $
 
 # This prints out extraordinary console messages.  You'll need to customize.
 
-chdir('/usr/adm/private/memories') || die "Can't cd.";
+chdir('/usr/adm/private/memories') || die "Can't cd to memories: $!\n";
 
 $maxpos = `cat oldmsgs 2>&1`;
 
@@ -197,12 +197,12 @@ while (<Msgs>) {
 }
 $max = tell(Msgs);
 
-open(tmp,'|sort >oldmsgs.tmp') || die "Can't create tmp file.";
+open(tmp,'|sort >oldmsgs.tmp') || die "Can't create tmp file: $!\n";
 while ($_ = pop(@seen)) {
     print tmp $_;
 }
 close(tmp);
-open(tmp,'oldmsgs.tmp') || die "Can't reopen tmp file.";
+open(tmp,'oldmsgs.tmp') || die "Can't reopen tmp file: $!\n";
 while (<tmp>) {
     if (/^nd:/) {
        next if $seen{$_} < 20;