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
|
---|
In Section
Seekers of Perl Wisdom
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
|
---|