11 unlink("afile.new") if -f "afile";
12 print "$!\nnot " unless open(my $f,"+>afile");
14 print "not " unless -f "afile";
16 print "not " unless print $f "SomeData\n";
18 print "not " unless tell($f) == 9;
20 print "not " unless seek($f,0,0);
23 print "not " unless $b eq "SomeData\n";
25 print "not " unless -f $f;
27 eval { die "Message" };
29 print "not " unless $@ =~ /<\$f> line 1/;
31 print "not " unless close($f);