Can't call FileHandle methods on unblessed file handle, since
IO::Handle is now the default class
use strict subs;
$mystdout = new_from_fd FileHandle 1,"w";
-autoflush STDOUT;
+$| = 1;
autoflush $mystdout;
print "1..4\n";
$buffer = <$fh>;
print $buffer eq "#!./perl\n" ? "ok 3\n" : "not ok 3\n";
-if ($^O eq 'VMS') {
- ungetc $fh 65;
- CORE::read($fh, $buf,1);
-}
-else {
- ungetc STDIN 65;
- CORE::read(STDIN, $buf,1);
-}
+ungetc $fh 65;
+CORE::read($fh, $buf,1);
print $buf eq 'A' ? "ok 4\n" : "not ok 4\n";