Super Edit: WWW:: Mechanize, , xml. , . .
use strict;
use warnings;
use Data::Dumper;
use XML::Simple;
use WWW::Mechanize;
$bot = WWW::Mechanize->new();
$bot->cookie_jar(
HTTP::Cookies->new(
file => "cookies.txt",
autosave => 1,
ignore_discard => 1,
)
);
$response = $bot->get( 'http://www.thePageYouLoginTo.com' );
$bot->form_number(1);
$bot->field( login => 'thisIsWhereYourLoginInfoGoes' );
$bot->field( pass => 'thisIsWhereYourPasswordInfoGoes' );
$response =$bot->click();
$response = $bot->get( 'http://website/computers/computers_main/config.xml' );
my $content = $response->decoded_content();
my $parser = new XML::Simple;
my $data = $parser->XMLin($content);
print Dumper($data);
. LWP:: Simple, . (xml ) XMLin.
: get $url.
Edit2: , , .
use strict;
use warnings;
use Data::Dumper;
use XML::Simple;
use LWP::Simple;
my $parser = new XML::Simple;
my $url = 'http://website/computers/computers_main/config.xml';
my $content = get $url or die "Unable to get $url\n";
my $data = $parser->XMLin($content);
print Dumper($data);