in reply to Sorting issues

Use a hash instead of two arrays.
my %foo = ( ebay => 'ebay.com', google => 'google.com', yahoo => 'yahoo.com' ); # The above hash assumes that no two links will ever be the same. # If they might be, but the URL isn't, just switch the order.
Then sort on the keys.
foreach my $link (sort keys %foo) { print qq[<a href="$foo{$link}">$link</a>]; }