use Foo; if (Foo->VERSION() < 1.56) { # do something... } # or if ($Foo::VERSION < 1.56) { # do something... } #### use Foo 1.56 # Die during compiletime if the minimum version is not met. #### perl -MList::Util -E 'say List::Util->VERSION()'