}
__END__
+()=()
+########
+$cusp = ~0 ^ (~0 >> 1);
+$, = " ";
+print +($cusp - 1) % 8, $cusp % 8, -$cusp % 8, ($cusp + 1) % 8, "!\n";
+EXPECT
+7 0 0 1 !
+########
$foo=undef; $foo->go;
EXPECT
Can't call method "go" without a package or object reference at - line 1.
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