in reply to Sorting issues

And here's a way that doesn't require you to start using a different datastructure:
#!/usr/bin/perl use strict; use warnings; my @urls = qw {yahoo.com ebay.com google.com}; my @links = qw {yahoo ebay google}; my @s_ind = sort {$urls [$a] cmp $urls [$b]} 0 .. $#urls; @urls = @urls [@s_ind]; @links = @links [@s_ind]; print "@urls\n"; print "@links\n"; __END__ ebay.com google.com yahoo.com ebay google yahoo

The code constructs an array with indices. First index is the position of the url that should come first, second index is the position of the url that should come second, etc, etc. Given that, sorting the urls and links happen in the same way.

Abigail