for my $line (@lines) { if ($line =~ /^Forecast for/ && !$adeldesc) { while ($lines[$cnt++] ne "") { $adeldesc .= " $lines[$cnt]"; } } if ($line =~ /^([\w\s]+):.*?Max\s+(\d+)/) { $cities{$1}{max} = $2; } $cnt++; } #### var adeldesc = " Fine, with high cloud. Cool to mild with light to moderate northeast to northwest winds. " var mtbkmax = "15" var noarmax = "16" var adelmax = "17" var elizmax = "17"