in reply to Re^7: How to look for two different file extensions?
in thread How to look for two different file extensions?

for (1..6) { print "$_\n" if $_ == 2 or $_ == 3 or $_ == 5 or $_ == 8 ; }
Perl 5 does EXACTLY the right thing and is production ready. I have never hoped that your code would ever work in Perl5. Your simplified example is not the real world.

Replies are listed 'Best First'.
Re^9: How to look for two different file extensions?
by Laurent_R (Canon) on Mar 10, 2017 at 00:05 UTC
    Sure, I am doing that everyday at $work in Perl 5, but if I can save typing four times almost the same thing with just different values, then I am happier. it gives me more time to concentrate on the real problem I have to solve.

    And I am really sorry for you if you have already given up hope that programming languages could be easier.

    A reply falls below the community's threshold of quality. You may see it by logging in.