package MyTest; use strict; sub import { *main::chomp = \&MyTest::chomp; # Doesn't work # *::chomp = \&MyTest::chomp; # Doesn't work either # *CORE::chomp = \&MyTest::chomp; # Nope # *main::chomp = \*MyTest::chomp; # Sorry, no go # *::chomp = \*MyTest::chomp; # I wish # *CORE::chomp = \*MyTest::chomp; # Please, give it up } sub chomp($) { my $str = shift; CORE::chomp($str); return $str . "_this is a test"; } 1;