Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re^13: partial matching of lines in perl (updated)

by AnomalousMonk (Archbishop)
on Jun 16, 2020 at 04:59 UTC ( [id://11118122]=note: print w/replies, xml ) Need Help??


in reply to Re^12: partial matching of lines in perl
in thread partial matching of lines in perl

Update: Ok, you've just changed nodes Re^11: partial matching of lines in perl and Re^12: partial matching of lines in perl to remove matter to which I've just spent a fair amount of time responding. Please don't do that. It's ok to make changes in your posts, but such changes should never be made in such a way as to destroy context. Please see How do I change/delete my post? for site etiquette and protocol regarding changes.


First, let's talk about formatting PerlMonks posts.

  1. The code here has no closing  </code> tag, so it's almost unreadable. You should have seen it was unreadable when you previewed this post. If you can't read it, neither can we. Please see Writeup Formatting Tips and Markup in the Monastery.
  2. This post contains a mixture of text and data. All code, data, program input/output, and warning and error messages shoud be wrapped (separately!) in  <code> ... </code> tags. Text should be wrapped in  <p> ... your text here ... </p> tags.
  3. These <--> two separate posts pertain to the same problem and/or question. There is no reason for them to be separate. Making them separate adds to the "noise" of the thread and obscures the true relationship of the matter in the posts (and in other pairs of your posts in which you have used this practice). Wise use of  <p> ... </p> and  <code> ... </code> tags will allow you to clearly differentiate the various different matter within a single post.
Ok, housekeeping done. Now on to practical matters.

... help me out and write an executable code

You already have executable code here! I simply took this code and rewrote it slightly to use file names I thought were more appropriate and a directory local to my development tree, and to use the proper syntax for print-ing to a filehandle, and posted it here, along with the contents of the two input files and the output of the code. This code produced output and correct output insofar as I understood your requirements.

In response to this post, I took the data posted therein (insofar as I could understand its structure) and put it into files goodfile.txt and badfile.txt as indicated in the post. I then changed my version of your code posted here to use the different file names and data and ran it. The output I saw was the single line
    don't you
which I understand to be correct: it's the only line in goodfile.txt that doesn't have some line from badfile.txt as a substring. What do you get when you run my code posted here, either with my posted files/data or with your own? Either way, you should get something, not nothing.

Please carefully review the various steps you have taken to exercise the code you have written and that has been posted in this thread by others. I suspect that, in the midst of a deluge of details, you have overlooked critical steps and are now wandering in desperate confusion. Don't worry; we've all been there. Take a step (or two) back, relax, take a deep breath, enjoy a cookie, center your thoughts, and when your mind has cleared, begin again. Run code that has been posted here with its accompanying data and see if you get the claimed results. If you do, ask how this code/data differs from that you are using. If this approach yields no success, come back and we'll try another tack.


Give a man a fish:  <%-{-{-{-<

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11118122]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-23 20:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found