Nathan Hilterbrand writes:
> Just firing from memory here...
> 
>   my $warning_occured = 0;
>   my $default_warn = $SIG{__WARN__};
>   $SIG{__WARN__} = sub {
>     $warning_occured = 1;
>     $default_warn(@_);
>   }
> 
> Then in later code:
>   if ($warning_occured) {
>       # Code to run if a warning occured
>   } else {
>       # Code to run if no warning occured
>   }
> 
> Something like that should work, I think.

        Thank you very much and to the responder who pointed to
perldoc. This gets me going in the right direction.

Martin

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to