4 # test auto defined() test insertion
10 $SIG{__WARN__} = sub { $warns++; warn $_[0] };
14 $wanted_filename = $^O eq 'VMS' ? '0.' : '0';
16 print "not " if $warns;
27 while (my $name = <FILE>)
29 $seen++ if $name eq '0';
31 print "not " unless $seen;
39 $seen++ if $line eq '0';
40 } while ($line = <FILE>);
42 print "not " unless $seen;
48 while (($seen ? $dummy : $name) = <FILE>)
50 $seen++ if $name eq '0';
52 print "not " unless $seen;
58 while ($where{$seen} = <FILE>)
60 $seen++ if $where{$seen} eq '0';
62 print "not " unless $seen;
67 while (my $name = readdir(DIR))
69 $seen++ if $name eq $wanted_filename;
71 print "not " unless $seen;
77 while (($seen ? $dummy : $name) = readdir(DIR))
79 $seen++ if $name eq $wanted_filename;
81 print "not " unless $seen;
86 while ($where{$seen} = readdir(DIR))
88 $seen++ if $where{$seen} eq $wanted_filename;
90 print "not " unless $seen;
94 while (my $name = glob('*'))
96 $seen++ if $name eq $wanted_filename;
98 print "not " unless $seen;
103 while (($seen ? $dummy : $name) = glob('*'))
105 $seen++ if $name eq $wanted_filename;
107 print "not " unless $seen;
111 while ($where{$seen} = glob('*'))
113 $seen++ if $where{$seen} eq $wanted_filename;
115 print "not " unless $seen;
120 my %hash = (0 => 1, 1 => 2);
123 while (my $name = each %hash)
125 $seen++ if $name eq '0';
127 print "not " unless $seen;
132 while (($seen ? $dummy : $name) = each %hash)
134 $seen++ if $name eq '0';
136 print "not " unless $seen;
140 while ($where{$seen} = each %hash)
142 $seen++ if $where{$seen} eq '0';
144 print "not " unless $seen;