# Note that the loops below preserve line endings.
open my $handle, '<', $filename
- or die "open($filename) failed: $!";
+ or die "open($filename): $!";
# First, we find the PGP signature headers.
while (<$handle>) {
last if m/^-----BEGIN PGP SIGNED MESSAGE-----\s*\r*\n$/;
last if m/^-----END PGP SIGNATURE-----\s*\r*\n$/;
}
close $handle
- or die "close($filename) failed: $!";
+ or die "close($filename): $!";
return join('', @lines);
}
my $filename = shift;
open my $handle, '<', $filename
- or die "open($filename) failed: $!";
+ or die "open($filename): $!";
my $records = read_directive($handle);
close $handle
- or die "close($filename) failed: $!";
+ or die "close($filename): $!";
return $records;
}
my $text = shift;
open my $handle, '<', \$text
- or die "open memory file failed: $!";
+ or die "open memory file: $!";
my $records = read_directive($handle);
close $handle
- or die "close memory file failed: $!";
+ or die "close memory file: $!";
return $records;
}