I did things slightly differently though -- more localized, I think.
cheers.{ local $SIG{__WARN__} = sub { my @warnings = @_; foreach my $warning (@warnings) { print "got a warning: $warning\n"; } }; eval {'' =~ /$re/ }; }
In reply to Re^3: trapping -w warnings
by tphyahoo
in thread trapping -w warnings
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |