in reply to Re: Edit huge file
in thread Edit huge file
what is the 'l' doing in your one-liners that start with: perl -nle"..."
Literally, it autochomps input and auto-appends $\ for print statements.
Generically, it is useful when using print as it avoids having to append "\n". Also, when comparing with literals, the autochomping avoids having to add the "\n" into the literals.
In the specific case of my one-liner in this thread, it is redundant and actually slows the solution down by ~20%. So good catch++.
|
|---|