Howard,
Repeating yourself in your old age...
You are correct however that a programmer would try to exclude all potential pitfalls. Guess that's why I'm not a programmer. Always hated the Murphy-proofing.
So my last revision of code is still like swiss cheese. The IF statements under the conditions previously mentioned could return a false positive. I only say could because without knowing what all is in the source text file one can only surmise.
so:
if instr($sending,'sending ')
whould be more accurate as:
if left($sending,8)='sending '
Ditto for:
if instr($receiving,'receiving ')
should be:
if left($receiving,10)='receiving '
As for 'optimistic' code, Ruud had this to say in an interview
quote:
Steve:
Do you have any tips that will help admins write more efficient code?
Ruud:
Mmm, let me think on that for a second.
Adding proper error handling to scripts.
(Most scripts I get to see are, Mmm, very 'optimistic' about the actions in them).
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.