Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Replace new line with white space

by fattahsafa (Sexton)
on Mar 09, 2014 at 20:40 UTC ( [id://1077620]=note: print w/replies, xml ) Need Help??


in reply to Re: Replace new line with white space
in thread Replace new line with white space

This node falls below the community's threshold of quality. You may see it by logging in.
  • Comment on Re^2: Replace new line with white space

Replies are listed 'Best First'.
Re^3: Replace new line with white space
by davido (Cardinal) on Mar 09, 2014 at 22:24 UTC

    Stop saying "It didn't work", without supporting documentation of the failure. You did it here, and here, and here; three times out of nine posts. "It didn't work" is absolutely useless information, and gets you no closer to a solution. Here's how that sort of post should look:

    I tried to incorporate your suggestion into my code, but it didn't work as I intended. Here's my code:

    # 5 to 20 lines of code that can compile, and # that shows the failure.

    Here is the sample input:

    # A few lines of characteristic input.

    And here is the output I'm getting:

    # A few lines of output that the code you posted produces with the inp +ut you posted.

    And here is what I would like it to produce:

    # A few lines of output that the posted input should result in if the +code were working ok.

    With that sort of thorough problem description, you will get more useful answers, more quickly.


    Dave

      Stop saying "It didn't work", without supporting documentation of the failure.

      Yes, I can only fully and wholeheartedly agree with you. Thank you, David, for that. I really found the OP's answer to my suggested solution on one of the other posts you mention to be very frustrating, because I knew my solution worked (or at least did precisely what I wanted it to do). It turned out that it was not exactly what the OP was looking for, but a message like:

      Thank you..it didn't work

      really does not help us helping the person asking for assistance.

    A reply falls below the community's threshold of quality. You may see it by logging in.
Re^3: Replace new line with white space
by Kenosis (Priest) on Mar 09, 2014 at 20:41 UTC

    Show what you've tried. It may also help to mention the OS where the text was created, since you may need to s/\r\n/ /g.

      I'm working on windows

        That's only answering half of what kenosis asked. What have you tried?

        It seems like such a simple problem that if your solution didn't work, we need to see it so that we can understand what you're doing wrong. Until then, s/\n/ / is a perfectly reasonable answer. If that answer doesn't suit you, we need to know why. "It didn't work." isn't a good enough reason. We need to know how it was incorporated into your solution, and how failure manifested itself.


        Dave

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2024-04-24 06:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found