No such thing as a small change | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
WARNING: Untested code follows.
Execution, The diamond operator (<>) reads files one line by one line into memory instead of reading the whole content at once. The $_ default variable will hold the line in each iteration. This operator will continue to do so until all files are out of lines, returns undef and the while loop terminates. The last line in the loop is merely for an aesthetic to allow us identify the correct line number of the currently processed file for throwing warning. You might not need both the last line and the unless clause. After reading this, you may want to go to at least one of open, perlop, perlvar, and some of perlfaqs. But I think you should go there first though. Simple or super search on the term "read file" will result in a bunch of nodes discussing this issue. Also, you may want to dig a bit on the Q&A part, specially on the files category. Well, I guess I'm in the mood of something. Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy! In reply to Re: need help reading through two large files and output matches and non matches
by naikonta
|
|