in reply to parsing commandline arguments

at the risk of being more confusing (as well as leaving out strict and my), I offer this:
while(@ARGV){
        ($_, $v) = splice @ARGV, -2;
        $ip = $v if /--?ip?/;
        $port = $v if /--?p(ort)?/
}