in reply to Wisdom on the Getopt::Long module

I think this satisfies your requirements:
GetOptions('x:s'=>\$x); $x = 0 unless $x;

On a side note, please do not enclose your whole posting inside "pre" tags. You should post only your code inside "code" tags. Refer to Writeup Formatting Tips.

Replies are listed 'Best First'.
A reply falls below the community's threshold of quality. You may see it by logging in.