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