diff options
Diffstat (limited to 'pp_sys.c')
-rw-r--r-- | pp_sys.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1003,8 +1003,13 @@ PP(pp_select) } if (newdefout) { - if (!GvIO(newdefout)) - gv_IOadd(newdefout); + if (!GvIO(newdefout)) { + if (ckWARN(WARN_UNOPENED)) + warner(WARN_UNOPENED, "select() on unopened file"); + if (SvTYPE(newdefout) != SVt_PVGV) + RETURN; + gv_IOadd(newdefout); /* XXX probably bogus */ + } setdefout(newdefout); } |