$gw1, $gw2, $gw3, $gw4, $gw5 = $gw; if ($gw =~.... if ($gw1 =~.... if ($gw2 =~.... etc...