in reply to Perl Switch Errors on certain version

This doesn't solve your problem (which probably should be solved by a complete rewrite anyway), but I noticed a couple of conditions of the form: $new1 == /1/. Now, that's legal Perl, but are you really sure you want this? It would be true if $_ contains a 1 and $new equals 1, or if $_ doesn't contain a 1 and $new equals 0 (or the empty string, or is undefined).
Perl --((8:>*