This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
open(FH,undef) # creates new_tmpfile opened read/write
[perl5.git] / t / io / open.t
CommitLineData
3eb568f1
NIS
1#!./perl
2
3# $RCSfile$
4$| = 1;
5
6print "1..6\n";
7
8print "$!\nnot " unless open(A,undef);
9print "ok 1\n";
10print "not " unless print A "SomeData\n";
11print "ok 2\n";
12print "not " unless tell(A) == 9;
13print "ok 3\n";
14print "not " unless seek(A,0,0);
15print "ok 4\n";
16$b = <A>;
17print "not " unless $b eq "SomeData\n";
18print "ok 5\n";
19print "not " unless close(A);
20print "ok 6\n";
21
22