in reply to "Useless use of a constant" in grep block?

It's not useless, "foo" is true in Perl !

It's reasonable to allow a grep to be changed in a way that it greps the whole list.

Since there is no explicit TRUE or FALSE statement in Perl, one can't tell if a literal string was just meant to be true or could be a typo.

Like already said, adding too many rare edge cases to Perl's error detection would make the code base unnecessarily complicated.

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!

  • Comment on Re: "Useless use of a constant" in grep block?