in reply to Re: perl socket
in thread perl socket

Eh, no. shift || DEFAUTL_ADDR will do just fine, as a trivial example would have shown:
$ perl -wle 'use constant DEFAULT_ADDR => "127.0.01"; my $address = shift || DEFAULT_ADDR; print $address' 192.168.1.1 192.168.1.1
It's always wise to test your code before giving advice, but it's quite unwise to *not* test code you're claiming needs to be done differently.