sub TIEHANDLE {
bless {}, shift;
}
+ sub READLINE {
+ "Out of inspiration";
+ }
sub DESTROY {
print "and destroyed as well\n";
}
local(*FOO);
tie(*FOO,'foo');
print FOO "sentence.", "reversed", "a", "is", "This";
+ print "-- ", <FOO>, " --\n";
}
EXPECT
This is a reversed sentence.
+-- Out of inspiration --
and destroyed as well