$mech->content() =~ m#Lumber:(\d+)#i; my $lumber = $1; $mech->content() =~ m#Clay:(\d+)#i; my $clay = $1; $mech->content() =~ m#Iron:(\d+)#i; my $iron = $1; $mech->content() =~ m#Crop:(\d+)#i; my $crop = $1;