foreach my $link_found( $parser->links ) { next unless $$link_found[1] eq 'src'; my $uriobj = URI->new( $$link_found[2]); my $absurl = $uriobj->abs($base); #if is a frame add to pages adding an iteration to this sub if ($$link_found[0] eq 'frame'||$$link_found[0] eq 'iframe') { push @{$stat{'pages'}}, "$absurl"; next } #? need to stringify $absurl #else is a content and we add this to the cache hash $stat{cache}{ $absurl }=[] # will store there length and time later on }