Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
The difference between IO operations, and IO operations hidden behind a function call are infinitesimal. The only additional time involved is that which takes to install the module using cpan.
KevinADC said:Code:perl -pe "/string1/ && !/string2/" sourcefile.txt > resultsfile.txt
perl --help said:-n assume "while (<>) { ... }" loop around program
-p assume loop like -n but print line also, like sed
perl -ne "/string1/ && !/string2/ && print" sourcefile.txt > resultsfile.txt
KevinADC said:It's not the IO that worried me, or the loading of the one module. The map function being used to read the file into a data structure for grep to work with is the culprit. Map is convenient, but I am not sure how efficient it is in this case. I could be totally wrong though.
That's close, but -p prints every line. He would want -n.