Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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:  <%-{-{-{-<


In reply to Re^13: partial matching of lines in perl (updated) by AnomalousMonk
in thread partial matching of lines in perl by Sidd@786

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (2)
As of 2024-04-25 21:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found