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_rv2av]
109 use warnings 'uninitialized' ;
112 no warnings 'uninitialized' ;
115 Use of uninitialized value in array dereference at - line 4.
117 # pp_hot.c [pp_rv2hv]
118 use warnings 'uninitialized' ;
121 no warnings 'uninitialized' ;
124 Use of uninitialized value in hash dereference at - line 4.
126 # pp_hot.c [pp_aassign]
127 use warnings 'misc' ;
128 my %X ; %X = (1,2,3) ;
130 my %Y ; %Y = (1,2,3) ;
132 Odd number of elements in hash assignment at - line 3.
134 # pp_hot.c [pp_aassign]
135 use warnings 'misc' ;
136 my %X ; %X = [1 .. 3] ;
138 my %Y ; %Y = [1 .. 3] ;
140 Reference found where even-sized list expected at - line 3.
142 # pp_hot.c [Perl_do_readline]
143 use warnings 'closed' ;
144 close STDIN ; $a = <STDIN> ;
145 opendir STDIN, "." ; $a = <STDIN> ;
147 no warnings 'closed' ;
148 opendir STDIN, "." ; $a = <STDIN> ;
151 readline() on closed filehandle STDIN at - line 3.
152 readline() on closed filehandle STDIN at - line 4.
153 (Are you trying to call readline() on dirhandle STDIN?)
155 # pp_hot.c [Perl_do_readline]
157 my $file = "./xcv" ; unlink $file ;
158 open (FH, ">$file") or die $! ;
163 open(FOO, ">&FH") or die $! ;
170 close (FH) or die $! ;
171 close (FOO) or die $! ;
174 Filehandle FH opened only for output at - line 5.
175 Filehandle FOO opened only for output at - line 10.
176 Filehandle FOO opened only for output at - line 14.
177 Filehandle FH opened only for output at - line 15.
179 # pp_hot.c [Perl_sub_crush_depth]
180 use warnings 'recursion' ;
186 local $SIG{__WARN__} = sub {
187 die "ok\n" if $_[0] =~ /^Deep recursion on subroutine "main::fred"/
194 # pp_hot.c [Perl_sub_crush_depth]
195 no warnings 'recursion' ;
201 local $SIG{__WARN__} = sub {
202 die "ok\n" if $_[0] =~ /^Deep recursion on subroutine "main::fred"/
209 # pp_hot.c [Perl_sub_crush_depth]
210 use warnings 'recursion' ;
218 Deep recursion on anonymous subroutine at - line 5.
220 # pp_hot.c [Perl_sub_crush_depth]
221 no warnings 'recursion' ;
230 # pp_hot.c [pp_concat]
231 use warnings 'uninitialized';
234 a($x . "x"); # should warn once
235 a($x . $y); # should warn twice
236 $x .= $y; # should warn once
237 $y .= $y; # should warn once
239 Use of uninitialized value in concatenation (.) or string at - line 5.
240 Use of uninitialized value in concatenation (.) or string at - line 6.
241 Use of uninitialized value in concatenation (.) or string at - line 6.
242 Use of uninitialized value in concatenation (.) or string at - line 7.
243 Use of uninitialized value in concatenation (.) or string at - line 8.
245 # pp_hot.c [pp_concat]
249 unless ($Config{ccflags} =~ /Y2KWARN/) {
250 print "SKIPPED\n# perl not built with -DPERL_Y2KWARN";
257 $x = "19" . $yy . "\n";
259 $x = "319" . $yy . "\n";
266 $x = "19" . $yy . "\n";
268 Possible Y2K bug: about to append an integer to '19' at - line 12.
269 Possible Y2K bug: about to append an integer to '19' at - line 13.
271 # pp_hot.c [pp_aelem]
283 Use of reference ".*" as array index at - line 4.
285 # pp_hot.c [pp_aelem]
286 package Foo;use overload q("") => sub {};package main;$a = bless {}, "Foo";
301 Use of reference ".*" as array index at - line 7.