if( $@ =~ /some error stuff/ ) {
warn "error stuff occurred";
}
else {
warn "some other message" ;
}
As I said I usually just do
if($@) { Oops; }
but now you mentioned it and I remember one case when I have to examine
$@ content deeper. But usually I'm avoiding this, particularly because I don't see the way to do it clean.
I feel like Perl exceptions are kind of like Perl OO in general.
I feel that too. The problem is that
$@ may contain any object, there's no standard interface to it. If there will be a module that change this situation, that would be great.