in reply to Re^2: Regex question
in thread Regex question

Another, lazier, way is to use an array and localize the default list separator

@days = ( 1 .. 31 ); local $" = q{|}; m{(?:@days)};

You'd probably want to limit the local $" inside a code block to avoid unexpected side effects elsewhere.

Cheers,

JohnGG