in reply to Stringifying undefs

I see a golf game ;) this one only goes for it if it's truly undefined
perl -e '$_=shift;print(defined$_?$_:0)'
this one is shorter but also matches an empty string
perl -e '$_=shift;print(/^$/?0:$_)'