my @locations = map {[$urls[$_], $links[$_]]} 0 .. $#urls; print join(': ', @$_), $/ for sort {$a->[1] cmp $b->[1]} @locations;