I guess I'm missing the mystery. You have my $static and it's undef. It's not going to default to 42 because it's not 0. Once you use the unary op ++, it'll cast undef to a number (in this case 0) and then increment it.
Maybe I'm missing something here, and if I am, my apologies.
--
I used to drive a Heisenbergmobile, but everyone I looked at the speedometer, I got lost.