in reply to Re: complicated expression
in thread complicated expression
This creates an anonymous hash with entries according to your 'x:y' specification, though no checking is made for 'x:y:z', which is presumably invalid and liable to break this badly. Assuming that's alright, then what happens is the 'l', 'p' and 'port' values are extracted, in that specific order. If one is not specified, it comes out as undef.my @parts = split (' ', $str); my ($ip, $path) = @parts[0,1]; my ($user, $pass, $port) = @{{map {split(/:/)} @parts[2,3,4]}}{'l','p' +,'port'};
|
|---|