#!/usr/bin/perl use strict; use warnings; use HTML::TableExtract; use LWP::Simple qw/ get /; my $monk = shift or die "$0 [monkname]\n"; my $url = "http://perlmonks.org/index.pl?node=${monk}"; my $html = HTML::TableExtract->new; $html->parse( get $url ); foreach my $table ( $html->table_states ) { foreach my $row ( $table->rows($table) ) { if ( $row->[0] eq 'Experience:' ) { print "$monk has $row->[1] XP. \n", "Give 'em \$1 and they might be able \n", "to buy a cup of coffee, too. \n"; exit; } } } print "No XP found ... perhaps ${monk} doesn't exist?\n";