in reply to Re: "Useless use of a constant" in grep block?
in thread "Useless use of a constant" in grep block?
I tend to agree on the relatively low frequency that people might make this kind of mistake. But:
Also, "Probably" doesn't really belong in warnings :) it means this shouldn't be a warning
I beg to differ. Perl has quite a few warnings of this very nature, where a syntax is perfectly valid but probably not what the programmer meant. Some examples (see perldiag for more details and a more complete list):
Possible attempt to put comments in qw() list
Possible attempt to separate words with commas
Possible memory corruption: %s overflowed 3rd argument
Possible precedence issue with control flow operator
Possible precedence problem on bitwise %s operator
Possible unintended interpolation of $\ in regex
/%s/ should probably be written as "%s"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: "Useless use of a constant" in grep block?
by Anonymous Monk on Aug 03, 2017 at 09:01 UTC | |
by perlancar (Hermit) on Aug 03, 2017 at 11:27 UTC | |
by Anonymous Monk on Aug 04, 2017 at 10:14 UTC | |
by Anonymous Monk on Aug 03, 2017 at 12:00 UTC |