Thanks, that was a huge help and very generous of you. Here's what I take away:
- Don't use the ternary operator when the value tested is the value to be set. Use the || operator.
- $! contains system call information.
- It's often better to create an anonymous array directly.
- Use the quotemeta operator for interpolating strings into regular expressions.
Thanks a lot!