in reply to parsing commandline arguments
while(@ARGV){ ($_, $v) = splice @ARGV, -2; $ip = $v if /--?ip?/; $port = $v if /--?p(ort)?/ }