my $islandid;
while ($resptxt =~
- m/^islands\[\d+\]\[\d+\]\=new\s+option\(\"(.*)\"\,(\d+)\)\s*$/mig
+ m/^islands\[(\d+)\]\[\d+\]\=new\s+option\(\"(.*)\"\,(\d+)\)\s*$/mig
) {
- next unless $1 eq $island;
- $islandid= $2;
+ next unless $1 eq $oceanids[0];
+ next unless $2 eq $island;
+ $islandid= $3;
}
defined $islandid or die;