On 7/20/07, Ralf Mattes <[EMAIL PROTECTED]> wrote:
I'd go for:

 if ( $f = ~m/\.c(c|pp){0,1}$/i )

This variant avoids backtracking  and makes the regexp case insensitive.
Yes, it does accept monsters like 'Foo.cPp'. but who cares :-)
which is equal to
if ( $f =~m/\.c(c|pp)?$/i )

Reply via email to