01/05/31 16:42 /ItWxlxM.net
# ostream.pm
package ostream;
use base Exporter;
use Carp;
use strict;
use overload
'<<' => \&print;
our @EXPORT = qw(cout endl);
use constant cout => bless {};
use constant endl => "\n";
sub print{
my $self = shift;
my $arg = shift;
shift and croak "syntax error";
CORE::print($arg);
return $self;
}
__END__