Explanation of such things as: Use of if, or and $! greatly appreciated. One of those posts that makes brings together lots of snippets from here and there to create something far greater than the sum of it's parts.
If I can vote for this reply I will, though it'll have to be tomorrow, my 5 for today have been spent.