2 ms·
It's not about being unreadable (I gave you my reading! It means skip this line if it starts with a literal # character or "starts with" the end-of-line marker
by logicallee 10y ago
It's not about being unreadable (I gave you my reading! It means skip this line if it starts with a literal # character or "starts with" the end-of-line marker, i.e. is blank. # is a literal, $ is the end of line character and | separates them with an or. You have to be completely familiar with regexes to know that this is correct.
This line is simple.
More complicated lines are...more complicated. Testing lets you know that code is working. Perl is the first major project that had amazing, obscene amounts of test coverage. I would say it is due to the grammar and difficulty.
I agree with you that it is clear and idiomatic Perl! Clear and idiomatic Perl is also easy to misparse using just your brain. Test code is what tells you what you wrote is doing what it is supposed to be doing.
Nobody writes Perl code, reads it carefully and reasons about it, and figures that if it compiles it is probably correct. Further, nobody has ever written code in Perl that way. Instead Perl has a heavy culture of testing.
You can argue with it but it's simply true. Contributors to CPAN have had more test coverage than the average project, and this has been true for a very long time. There's no real way to debate this.