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;
68 while (my $name = readdir(DIR))
70 $seen++ if $name eq $wanted_filename;
72 print "not " unless $seen;
78 while (($seen ? $dummy : $name) = readdir(DIR))
80 $seen++ if $name eq $wanted_filename;
82 print "not " unless $seen;
87 while ($where{$seen} = readdir(DIR))
89 $seen++ if $where{$seen} eq $wanted_filename;
91 print "not " unless $seen;
95 while (my $name = glob('*'))
97 $seen++ if $name eq $wanted_filename;
99 print "not " unless $seen;
104 while (($seen ? $dummy : $name) = glob('*'))
106 $seen++ if $name eq $wanted_filename;
108 print "not " unless $seen;
112 while ($where{$seen} = glob('*'))
114 $seen++ if $where{$seen} eq $wanted_filename;
116 print "not " unless $seen;
121 my %hash = (0 => 1, 1 => 2);
124 while (my $name = each %hash)
126 $seen++ if $name eq '0';
128 print "not " unless $seen;
133 while (($seen ? $dummy : $name) = each %hash)
135 $seen++ if $name eq '0';
137 print "not " unless $seen;
141 while ($where{$seen} = each %hash)
143 $seen++ if $where{$seen} eq '0';
145 print "not " unless $seen;