use Regexp::Common; /^$RE{list}{-sep => ','}{-pat => '\w+'}$/