I can't answer your gold question, but your script has the same problem that many others do. If you're checking for a series of items with the intent to return anything not used at the end you must use if/elsif/else, otherwise the last else only applies to the last if.
|