in reply to Re: If condition logic yielding partially correct output
in thread If condition logic yielding partially correct output

Erm... "test" is equal to 0 in numeric context, so if (($key ne "") && ($key != 0)) evaluates as false for "test" ("test" ne "" is true, "test" != 0 is false; true && false = false), which is why the print after the if doesn't execute.