Good point with the use 5.20.1;, itâs not like we have to write backwards compatible code or something
I also think the way of reading in N lines of input using a C-style for loop is âunperlishâ and would probably more typically be done with something like foreach my $i (1..$n), but thatâs definitely more of a style issue. use strict, use warnings and lexicals on the other hand are a must, in my opinion.
I started tinkering around with Clash of Code and realized that there, I donât want use strict, to save time when typing. Thought Iâd add that here!
I agree, it does not really help for CoC.
However, we havenât planned to propose different templates for the same language at the moment. So thatâs either we propose a template that follow good practice in Perl, or⌠well we stay with the current template.
In my opinion, CodinGame should help developers to use and get used to good pratice when possible.
I keep coming back to this, but things keep popping up If use 5.12 or higher is included, use strict is implied and doesnât have to be issued separately, see perldoc use.
âuse 5.20.1â already include âuse strictâ, we know that.
However, âuse strictâ is a good practice for one who uses a pre v5.10 version of Perl. Writing it on in the template helps to not forget it if you are using an older version of Perl outside of CodinGame (sometimes for compatibility reason).