YA resync with mainstem, including VMS patches from others
[p5sagit/p5-mst-13.2.git] / eg / scan / scan_sudo
index e0a99ee..5b143e9 100644 (file)
@@ -1,10 +1,10 @@
 #!/usr/bin/perl -P
 
-# $Header: scan_sudo,v 2.0 88/06/05 00:18:01 root Exp $
+# $RCSfile: scan_sudo,v $$Revision: 4.1 $$Date: 92/08/07 17:20:42 $
 
 # Analyze the sudo log.
 
-chdir('/usr/adm/private/memories') || die "Can't cd.";
+chdir('/usr/adm/private/memories') || die "Can't cd to memories: $!\n";
 
 if (open(Oldsudo,'oldsudo')) {
     $maxpos = <Oldsudo>;
@@ -41,12 +41,12 @@ while (<Sudo>) {
 }
 $max = tell(Sudo);
 
-open(tmp,'|sort >oldsudo.tmp') || die "Can't create tmp file.";
+open(tmp,'|sort >oldsudo.tmp') || die "Can't create tmp file: $!\n";
 while ($_ = pop(@seen)) {
     print tmp $_;
 }
 close(tmp);
-open(tmp,'oldsudo.tmp') || die "Can't reopen tmp file.";
+open(tmp,'oldsudo.tmp') || die "Can't reopen tmp file: $!\n";
 while (<tmp>) {
     print $seen{$_},":\t",$_;
 }