sub version { print "whatever\n"; } version if ( @ARGV and shift =~ /^--?v(?:ersion)?$/ ); # ...