DIE(PL_no_usym, "filehandle");
if (GvIOp(gv))
IoFLAGS(GvIOp(gv)) &= ~IOf_UNTAINT;
+ if (sv == &PL_sv_undef) {
+#ifdef PerlIO
+ PerlIO *fp = PerlIO_tmpfile();
+#else
+ PerlIO *fp = tmpfile();
+#endif
+ if (fp != Nullfp && do_open(gv, "+>&", 3, FALSE, 0, 0, fp))
+ PUSHi( (I32)PL_forkprocess );
+ else
+ RETPUSHUNDEF;
+ RETURN;
+ }
tmps = SvPV(sv, len);
if (do_open(gv, tmps, len, FALSE, O_RDONLY, 0, Nullfp))
PUSHi( (I32)PL_forkprocess );
--- /dev/null
+#!./perl
+
+# $RCSfile$
+$| = 1;
+
+print "1..6\n";
+
+print "$!\nnot " unless open(A,undef);
+print "ok 1\n";
+print "not " unless print A "SomeData\n";
+print "ok 2\n";
+print "not " unless tell(A) == 9;
+print "ok 3\n";
+print "not " unless seek(A,0,0);
+print "ok 4\n";
+$b = <A>;
+print "not " unless $b eq "SomeData\n";
+print "ok 5\n";
+print "not " unless close(A);
+print "ok 6\n";
+
+