I have a problem with my script. i cant output the response very well

this is the error i get

away_teamsARRAY(0x55fbf77894a0)timesARRAY(0x55fbf743be78)home_teamsARRAY(0x55fbf71ab7b0)scoresARRAY(0x55fbf71aba98)

this is the output i expect

times home_teams scores away_teams 12.05. 17:00 Brighton 1 - 4 Manchester City

Full code

#!/usr/bin/perl - wT use strict; use warnings; use LWP::UserAgent; use HTTP::Request; use HTML::TreeBuilder; use Data::Dumper; use CGI::Carp qw(fatalsToBrowser warningsToBrowser); # show errors in +browser print "Content-type: text/html\n\n"; # print output to browser my $url = 'https://www.flashscore.com/football/england/premier-league- +2018-2019/results/'; my $ua = LWP::UserAgent->new; sub get_scores { my $response = $ua->get($url); if ($response->is_success) { my $tree = HTML::TreeBuilder->new; $tree->parse($response->decoded_content); return $tree; } else { die $response->status_line; } } my $results = get_scores(); my @times = map { $_->as_text } $results->look_down(_tag => 'div', cla +ss => 'event__time'); my @home_teams = map { $_->as_text } $results->look_down(_tag => 'div' +, class => 'event__participant event__participant--home'); my @scores = map { $_->as_text } $results->look_down(_tag => 'div', cl +ass => 'event__scores fontBold'); my @away_teams = map { $_->as_text } $results->look_down(_tag => 'div' +, class => 'event__participant event__participant--away'); my %dict_res; for my $ind ($results) { push @{$dict_res{'times'}}, @times[$ind]; push @{$dict_res{'home_teams'}}, @home_teams[$ind]; push @{$dict_res{'scores'}}, @scores[$ind]; push @{$dict_res{'away_teams'}}, @away_teams[$ind]; print %dict_res; }

In reply to Web scrapping by joyfedl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.