in reply to Looking for a better way to build a hash from regex matches.

The situation is probably complex enough to justify the use of a proper HTML parser, but if you want to stick to regex then using named matches could simplify your code a bit:

$content =~ s/\n//g; if ( $content !~ /No UI/ ) { while ( $content =~ /<A\s+TARGET="UI"\s+HREF="(?<url>.*?)"> (?<batch>batch.*?)<\/A><\/TD> <TD\s+ALIGN.*?>(?<key>.*?)<\/TD> <TD\s+ALIGN.*?>(?<interaction>.*?)<\/TD> <TD\s+ALIGN.*?>(?<title>.*?)<\/TD> <TD\s+ALIGN.*?>(?<time>.*?)<\/TD> <TD\s+ALIGN.*?>(?<status>.*?)<\/TD>/gsxm ) { %{ $ui_hash{$server}{ $+{key} } } = %+; } }