in reply to Re: Reg Expression Question
in thread Reg Expression Question

$i =~ /[0|5|8|15|20]/

But that will also match 30,15,888,150,200, etc...

If you really want to use a regex for this, you'll need to anchor it like so:

$i =~ /^(0|5|8|15|20)$/;
Though I still think a hash is a better solution.

Update: changed the square brackets to parens, thanks Hofmator...

-Blake