[boulder.pm] print/exit on error?
Robert L. Harris
Robert.L.Harris at rnd-consulting.com
Thu Aug 17 10:07:20 CDT 2000
Every now and then some of the guys around here bring me scripts to look
at. Currently I have one that reads through about 250 files with about
100k lines apiece. Somewhere int he middle, they're getting an error on
a substr operation, line is too short.
What is the cleanest way to make a perl script do something along the line
or print out a variable (the file it's currently reading), $_, and then
exit when it gets such an error? I could check $? or such for error
condition and then exit, but is that the best way?
Robert
:wq!
---------------------------------------------------------------------------
Robert L. Harris | Micros~1 :
Senior System Engineer | For when quality, reliability
at RnD Consulting | and security just aren't
\_ that important!
DISCLAIMER:
These are MY OPINIONS ALONE. I speak for no-one else.
FYI:
perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'
More information about the Boulder-pm
mailing list