INSTALL_HOOK=1 perl -MO=Deparse -MB::Hooks::OP::Check::StashChange -e 'BEGIN { my $id = B::Hooks::OP::Check::StashChange::register(sub {}) if $ENV{INSTALL_HOOK}; } print split "x", "1x2"' use B::Hooks::OP::Check::StashChange; sub BEGIN { my $id = B::Hooks::OP::Check::StashChange::register(sub { } ) if $ENV{'INSTALL_HOOK'}; } print 'x', '1x2'; -e syntax OK