package Foo;
use strict;
use overload '>>' => 'right_shift';
sub new {bless {}, __PACKAGE__}
sub right_shift { print "OK!\n"}
1;
####
#!/usr/bin/perl -w
use strict;
use Foo;
my $foo = Foo->new;
"test" >> $foo;
####
Useless use of right bitshift (>>) in void context at foo.pl line 5.
OK!