in reply to finding a value in a list

split is useful too:
my ($group, $gid) = split;