3 Filehandle %s never opened
4 $f = $a = "abc" ; print $f $a
6 Filehandle %s opened only for input
9 Filehandle %s opened only for output
12 print on closed filehandle %s
13 close STDIN ; print STDIN "abc" ;
16 my $a = undef ; my @b = @$a
19 my $a = undef ; my %b = %$a
21 Odd number of elements in hash list
24 Reference found where even-sized list expected
27 Read on closed filehandle %s
28 close STDIN ; $a = <STDIN>;
30 Deep recursion on subroutine \"%s\"
31 sub fred { fred() if $a++ < 200} fred()
33 Deep recursion on anonymous subroutine
34 $a = sub { &$a if $a++ < 200} &$a
38 use warnings 'unopened' ;
41 no warnings 'unopened' ;
44 Filehandle main::abc never opened at - line 4.
51 open(FOO, ">&STDOUT") and print <FOO>;
54 ####################################################################
55 # The next test is known to fail on some systems (Linux/BSD+glibc, #
56 # NeXT among others. glibc should be fixed in the next version, #
57 # but it appears other platforms have little hope. We skip it for #
58 # now (on the grounds that it is "just" a warning). #
59 ####################################################################
64 Filehandle main::STDIN opened only for input at - line 3.
65 Filehandle main::STDOUT opened only for output at - line 4.
66 Filehandle main::STDERR opened only for output at - line 5.
67 Filehandle main::FOO opened only for output at - line 6.
68 Filehandle main::STDERR opened only for output at - line 7.
69 Filehandle main::FOO opened only for output at - line 8.
72 use warnings 'closed' ;
75 no warnings 'closed' ;
78 print on closed filehandle main::STDIN at - line 4.
81 use warnings 'uninitialized' ;
84 no warnings 'uninitialized' ;
87 Use of uninitialized value at - line 4.
90 use warnings 'uninitialized' ;
93 no warnings 'uninitialized' ;
96 Use of uninitialized value at - line 4.
99 use warnings 'unsafe' ;
100 my %X ; %X = (1,2,3) ;
101 no warnings 'unsafe' ;
102 my %Y ; %Y = (1,2,3) ;
104 Odd number of elements in hash assignment at - line 3.
107 use warnings 'unsafe' ;
108 my %X ; %X = [1 .. 3] ;
109 no warnings 'unsafe' ;
110 my %Y ; %Y = [1 .. 3] ;
112 Reference found where even-sized list expected at - line 3.
115 use warnings 'closed' ;
116 close STDIN ; $a = <STDIN> ;
117 no warnings 'closed' ;
120 Read on closed filehandle main::STDIN at - line 3.
123 use warnings 'recursion' ;
129 local $SIG{__WARN__} = sub {
130 die "ok\n" if $_[0] =~ /^Deep recursion on subroutine "main::fred"/
138 no warnings 'recursion' ;
144 local $SIG{__WARN__} = sub {
145 die "ok\n" if $_[0] =~ /^Deep recursion on subroutine "main::fred"/
153 use warnings 'recursion' ;
161 Deep recursion on anonymous subroutine at - line 5.
164 no warnings 'recursion' ;