2 ms·
This is generally correct, but your final analysis is slightly wrong and this is a perfect example of why Perl can be difficult to parse. If you add a 1 to the
by Sophira 5y ago
This is generally correct, but your final analysis is slightly wrong and this is a perfect example of why Perl can be difficult to parse.
If you add a 1 to the end of the "f/1;#/+" line, so that it becomes "f/1;#/+1", the code will become correct.
What's actually happening is that on Fridays, the "f/1;#/+" line means "call f, divide the result by 1, and throw away the result", followed by a comment. On any other day, it means "call f with the regex parameter /1;#/ and add an unspecified parameter to it". Since the right hand side of the + operator isn't specified, it is syntactically incorrect.