in reply to Re^8: Grep Pattern
in thread Grep Pattern

Which horrible programing practice?

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Replies are listed 'Best First'.
Re^10: Grep Pattern
by ikegami (Patriarch) on Dec 15, 2018 at 15:44 UTC

    Hardcoding the length of the pattern array instead of using the length of the array.

      From Re: Grep Pattern

      > I guess you could also replace "4" with "@pat" to make it even more general.

      Cheers Rolf
      (addicted to the Perl Programming Language :)
      Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

        Yes, that's exactly what should be done.

        (Not to be more general, though. To be more robust (less error-prone), more self-documenting, etc, etc.)