use constant ERRSTR => 1; if ( ERRSTR) { # errstr stuff }else{ # carp stuff }