in reply to help shorten this series of regexes

I probably wouldn't try to parse HTML using regular expressions, but since you didn't post an example of it I'll suggest the following:

my %hash; foreach my $type qw( Lumber Clay Iron Crop ) { if( $mech->content() =~ m#$type:</td><td align="right"><b>(\d+)#i +) { $hash{$type} = $1; # lc( $type ), etc if desired } else { # I dunno - what should happen if the match fails? } }