This is not helpful:
append I/O operator() on closed filehandle STDIN at - line 3.
append I/O operator() on closed filehandle STDIN at - line 4.
(Are you trying to call append I/O operator() on dirhandle STDIN?)
That .=<> compiles to a separate op from <> is an implementation
detail, so show ‘readline()’ as we do with <>.
(Are you trying to call readline() on dirhandle STDIN?)
########
# pp_hot.c [Perl_do_readline]
+use warnings 'closed' ;
+close STDIN ; $a .= <STDIN> ;
+opendir STDIN, "." ; $a .= <STDIN> ;
+closedir STDIN;
+no warnings 'closed' ;
+opendir STDIN, "." ; $a .= <STDIN> ;
+$a = <STDIN> ;
+EXPECT
+readline() on closed filehandle STDIN at - line 3.
+readline() on closed filehandle STDIN at - line 4.
+ (Are you trying to call readline() on dirhandle STDIN?)
+########
+# pp_hot.c [Perl_do_readline]
use warnings 'io' ;
my $file = "./xcv" ; unlink $file ;
open (FH, ">$file") or die $! ;
(const char *)(OP_IS_FILETEST(op) ? "" : "()");
const char * const func =
(const char *)
- (op == OP_READLINE ? "readline" : /* "<HANDLE>" not nice */
+ (op == OP_READLINE || op == OP_RCATLINE
+ ? "readline" : /* "<HANDLE>" not nice */
op == OP_LEAVEWRITE ? "write" : /* "write exit" not nice */
PL_op_desc[op]);
const char * const type =