Search results for "module:Perl::Critic::Policy::InputOutput::ProhibitReadlineInForLoop"
Perl::Critic::Policy::InputOutput::ProhibitReadlineInForLoop - Write < while( $line = < ){...} >> instead of < for(<){...} >>.
Using the readline operator in a "for" or "foreach" loop is very slow. The iteration list of the loop creates a list context, which causes the readline operator to read the entire input stream before iteration even starts. Instead, just use a "while"...
PETDANCE/Perl-Critic-1.152 - 17 Oct 2023 04:09:08 UTC