my @cat;
for my $path ( @files ){
print $path "$path 2\n";
- close($path);
+ close($path);
open($path, $path);
<$path>;
push @cat, <$path>;
- close($path);
+ close($path);
}
print "not " if (grep {/foo|bar/} @cat) && ! (grep {/baz|quux/} @cat);
print "ok 2\n" ;
cacheout '<', "foo";
print "not " unless <foo> eq "foo 2\n";
print "ok 4\n";
+ close(foo);
}
{# Test 5: that close is overridden properly
seek($_, 0, 0);
print "not " unless <$_> eq "$_\n";
print "ok 5\n";
+ close($_);
}
q(
seek($_, 0, 0);
print "not " unless <$_> eq "$_\n";
print "ok 5\n";
+ close($_);
}
);