http://www.perlmonks.org?node_id=811308


in reply to Best way to replace 'die' with 'warn'

Better:

sub whether_subroutine() { my @results; if( ! eval { @results= weather_subroutine(@_); 1 } ) { warn $@; return; } return @results; }

- tye