stones1030
Programmer
Is there a way to catch errors in a block of perl code and handle the errors per block.
I have been doing somehting like this
open(...) or die $!;
open (...) or die $!;
print $! unless (some condition);
SO right now I have script which checks for error messages on as many lines as possible. Is there a better way of doing this?If I open 3 files, i have to repeat this or die $! for each of them.
thank you
I have been doing somehting like this
open(...) or die $!;
open (...) or die $!;
print $! unless (some condition);
SO right now I have script which checks for error messages on as many lines as possible. Is there a better way of doing this?If I open 3 files, i have to repeat this or die $! for each of them.
thank you