2N/A chdir 't' if -d 't'; 2N/A print "1..0 # Skip: not perlio\n"; 2N/A print "# Close on scalar failed: $!\n"; 2N/A# Test that semantics are similar to normal file-based I/O 2N/A# Check that ">" clobbers the scalar 2N/A# Check that file offset set to beginning of scalar 2N/A# Check that writes go where they should and update the offset 2N/Aprint "# Got [$var], expect [Breathing]\n";
2N/A# Check that ">>" appends to the scalar 2N/Aprint "# Got [$var], expect [Something ]\n";
2N/A# Check that further writes go to the very end of the scalar 2N/Aprint "# Got [$var], expect [Something else ]\n";
2N/Aprint "# Got [$var], expect [Something else is here]\n";
2N/A# Check that updates to the scalar from elsewhere do not 2N/A$var =
"line one\nline two\line three\n";
2N/Aprint "# Got [$var], expect [foo]\n";
2N/A# Check that dup'ing the handle works # Check reading from non-string scalars print <
$fh>
eq "42" ?
"ok 23\n" :
"not ok 23\n";
# reading from magic scalars # don't warn when writing to an undefined scalar print $ok ? "ok 25\n" : "not ok 25\n";