I seem to recall I saw a post about this but my (brief) searching couldn't turn it up. What I'm trying to do is stringify undef to 0. I know undef is treated as 0 in a numeric context, but in a string context it's treated as ''. I'd like for it to appear as 0.
Prints "$foo = ". I'd like it to print "$foo = 0". Thoughts/suggestions?
If perhaps I didn't make myself clear, what I was looking for was some way to make undef 0 for every single occurence in the script without changing anything, so no adding "||0" or "defined $x?0:1" tests and stuff. Least effort and all that.