aboutsummaryrefslogtreecommitdiff
path: root/contrib/perl5/utils/splain.PL
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/perl5/utils/splain.PL')
-rw-r--r--contrib/perl5/utils/splain.PL7
1 files changed, 6 insertions, 1 deletions
diff --git a/contrib/perl5/utils/splain.PL b/contrib/perl5/utils/splain.PL
index a638dbae7174..0a71544de3a4 100644
--- a/contrib/perl5/utils/splain.PL
+++ b/contrib/perl5/utils/splain.PL
@@ -21,7 +21,12 @@ $file .= '.com' if $^O eq 'VMS';
# Open input file before creating output file.
$IN = '../lib/diagnostics.pm';
-open IN or die "Can't open $IN: $!\n";
+$in = open IN;
+if (!$in) {
+ $inmsg = "Can't open $IN: $!\n";
+ $IN = 'diagnostics.pm';
+ $in = open IN or die $inmsg, "Can't open $IN: $!\n";
+}
# Create output file.
open OUT,">$file" or die "Can't create $file: $!";