summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pp_sys.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/pp_sys.c b/pp_sys.c
index 239e3f79bb..7a9dc3987a 100644
--- a/pp_sys.c
+++ b/pp_sys.c
@@ -2557,7 +2557,7 @@ PP(pp_stat)
if (PL_op->op_flags & OPf_REF) {
gv = cGVOP_gv;
- if (PL_op->op_type == OP_LSTAT && ckWARN(WARN_IO))
+ if (PL_op->op_type == OP_LSTAT && ckWARN(WARN_IO) && gv != PL_defgv)
Perl_warner(aTHX_ WARN_IO,
"lstat() on filehandle %s", GvENAME(gv));
do_fstat: