3 print() on unopened filehandle abc [pp_print]
4 $f = $a = "abc" ; print $f $a
6 Filehandle %s opened only for input [pp_print]
9 Filehandle %s opened only for output [pp_print]
12 print() on closed filehandle %s [pp_print]
13 close STDIN ; print STDIN "abc" ;
15 uninitialized [pp_rv2av]
16 my $a = undef ; my @b = @$a
18 uninitialized [pp_rv2hv]
19 my $a = undef ; my %b = %$a
21 Odd number of elements in hash list [pp_aassign]
24 Reference found where even-sized list expected [pp_aassign]
27 Filehandle %s opened only for output [Perl_do_readline]
31 glob failed (can't start child: %s) [Perl_do_readline] <<TODO
33 readline() on closed filehandle %s [Perl_do_readline]
34 close STDIN ; $a = <STDIN>;
36 readline() on closed filehandle %s [Perl_do_readline]
39 glob failed (child exited with status %d%s) [Perl_do_readline] <<TODO
41 Deep recursion on subroutine \"%s\" [Perl_sub_crush_depth]
42 sub fred { fred() if $a++ < 200} fred()
44 Deep recursion on anonymous subroutine [Perl_sub_crush_depth]
45 $a = sub { &$a if $a++ < 200} &$a
47 Possible Y2K bug: about to append an integer to '19' [pp_concat]
50 Use of reference "%s" as array index [pp_aelem]
55 use warnings 'unopened' ;
58 no warnings 'unopened' ;
61 print() on unopened filehandle abc at - line 4.
65 # There is no guarantee that STDOUT is output only, or STDIN input only.
66 # Certainly on some BSDs (at least FreeBSD, Darwin, BSDi) file descriptors
67 # 1 and 2 are opened read/write on the tty, and the IO layers may reflect this.
68 # So we must make our own file handle that is read only.
69 my $file = "./xcv" ; unlink $file ;
70 open (FH, ">$file") or die $! ;
72 die "There is no file $file" unless -f $file ;
73 open (FH, "<$file") or die $! ;
75 open(FOO, "<&FH") or die $! ;
83 close (FH) or die $! ;
84 close (FOO) or die $! ;
87 Filehandle FH opened only for input at - line 12.
88 Filehandle FOO opened only for input at - line 14.
89 Filehandle FH opened only for input at - line 19.
90 Filehandle FOO opened only for input at - line 20.
93 use warnings 'closed' ;
99 no warnings 'closed' ;
104 print() on closed filehandle STDIN at - line 4.
105 print() on closed filehandle STDIN at - line 6.
106 (Are you trying to call print() on dirhandle STDIN?)
108 # pp_hot.c [pp_print]
109 # [ID 20020425.012] from Dave Steiner <steiner@bakerst.rutgers.edu>
110 # This goes segv on 5.7.3
111 use warnings 'closed' ;
112 my $fh = *STDOUT{IO};
113 close STDOUT or die "Can't close STDOUT";
114 print $fh "Shouldn't print anything, but shouldn't SEGV either\n";
116 print() on closed filehandle at - line 7.
118 # pp_hot.c [pp_rv2av]
119 use warnings 'uninitialized' ;
122 no warnings 'uninitialized' ;
125 Use of uninitialized value in array dereference at - line 4.
127 # pp_hot.c [pp_rv2hv]
128 use warnings 'uninitialized' ;
131 no warnings 'uninitialized' ;
134 Use of uninitialized value in hash dereference at - line 4.
136 # pp_hot.c [pp_aassign]
137 use warnings 'misc' ;
138 my %X ; %X = (1,2,3) ;
140 my %Y ; %Y = (1,2,3) ;
142 Odd number of elements in hash assignment at - line 3.
144 # pp_hot.c [pp_aassign]
145 use warnings 'misc' ;
146 my %X ; %X = [1 .. 3] ;
148 my %Y ; %Y = [1 .. 3] ;
150 Reference found where even-sized list expected at - line 3.
152 # pp_hot.c [Perl_do_readline]
153 use warnings 'closed' ;
154 close STDIN ; $a = <STDIN> ;
155 opendir STDIN, "." ; $a = <STDIN> ;
157 no warnings 'closed' ;
158 opendir STDIN, "." ; $a = <STDIN> ;
161 readline() on closed filehandle STDIN at - line 3.
162 readline() on closed filehandle STDIN at - line 4.
163 (Are you trying to call readline() on dirhandle STDIN?)
165 # pp_hot.c [Perl_do_readline]
167 my $file = "./xcv" ; unlink $file ;
168 open (FH, ">$file") or die $! ;
173 open(FOO, ">&FH") or die $! ;
180 close (FH) or die $! ;
181 close (FOO) or die $! ;
184 Filehandle FH opened only for output at - line 5.
185 Filehandle FOO opened only for output at - line 10.
186 Filehandle FOO opened only for output at - line 14.
187 Filehandle FH opened only for output at - line 15.
189 # pp_hot.c [Perl_sub_crush_depth]
190 use warnings 'recursion' ;
196 local $SIG{__WARN__} = sub {
197 die "ok\n" if $_[0] =~ /^Deep recursion on subroutine "main::fred"/
204 # pp_hot.c [Perl_sub_crush_depth]
205 no warnings 'recursion' ;
211 local $SIG{__WARN__} = sub {
212 die "ok\n" if $_[0] =~ /^Deep recursion on subroutine "main::fred"/
219 # pp_hot.c [Perl_sub_crush_depth]
220 use warnings 'recursion' ;
228 Deep recursion on anonymous subroutine at - line 5.
230 # pp_hot.c [Perl_sub_crush_depth]
231 no warnings 'recursion' ;
240 # pp_hot.c [pp_concat]
241 use warnings 'uninitialized';
244 a($x . "x"); # should warn once
245 a($x . $y); # should warn twice
246 $x .= $y; # should warn once
247 $y .= $y; # should warn once
249 Use of uninitialized value in concatenation (.) or string at - line 5.
250 Use of uninitialized value in concatenation (.) or string at - line 6.
251 Use of uninitialized value in concatenation (.) or string at - line 6.
252 Use of uninitialized value in concatenation (.) or string at - line 7.
253 Use of uninitialized value in concatenation (.) or string at - line 8.
255 # pp_hot.c [pp_concat]
259 unless ($Config{ccflags} =~ /Y2KWARN/) {
260 print "SKIPPED\n# perl not built with -DPERL_Y2KWARN";
267 $x = "19" . $yy . "\n";
269 $x = "319" . $yy . "\n";
276 $x = "19" . $yy . "\n";
278 Possible Y2K bug: about to append an integer to '19' at - line 12.
279 Possible Y2K bug: about to append an integer to '19' at - line 13.
281 # pp_hot.c [pp_aelem]
293 Use of reference ".*" as array index at - line 4.
295 # pp_hot.c [pp_aelem]
296 package Foo;use overload q("") => sub {};package main;$a = bless {}, "Foo";
311 Use of reference ".*" as array index at - line 7.