#!/usr/bin/perl use 5.010; use strict; use warnings; use Mojo::UserAgent; my $ua = Mojo::UserAgent->new; my ($btc) = $ua->get("https://blockchain.info/address/1Q8VghUJkNeFnaKy553b9buUWKxFYL579G") ->res ->dom ->find("#final_balance > font > span") ->map("text") ->each; say $btc;