linkextractor http://www.blah.com/ > preferedname.txt
####
linkextractor http://www.blah.com/ > preferedname.txt & del listurls.txt
##
##
linkextractor http://www.example.com/ > nul & move listurls.txt preferedname.txt
##
##
use strict;
use warnings;
use List::MoreUtils qw( uniq );
use WWW::Mechanize qw( );
# usage: linkextractor http://www.blah.com/ > listurls.txt
my ($url) = @ARGV;
my $mech = WWW::Mechanize->new();
my $response = $mech->get($url);
$response->is_success()
or die($response->status_line() . "\n");
print map { "$_\n" }
sort { $a cmp $b }
uniq
map { $_->url_abs() }
$mech->links();