Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I've been trying to remove zero from the first line and empty space from the start of the following line and join them together and print them to a new file.
0 54000 4.52402E+00 5.37331E+00 -5.37331E+00 -6.52528E-04 2.04301E-01 -1.07277E-03 0 54001 7.12575E+01 4.88288E+01 -4.88288E+01 -2.20964E-03 9.34513E-01 -1.76121E-03 0 54002 3.55673E+00 9.22908E+00 -9.22908E+00 1.05358E-04 1.78918E-01 1.74279E-04 0 54003 2.71198E+00 5.04349E+00 -5.04349E+00 0 1.73257E+00 4.45074E+00 0 54004 2.23790E+00 3.46888E+00 -3.46888E+00 -1.95970E-05 5.09952E-02 -1.95518E-05 0 54005 4.14851E+00 1.99183E+01 -1.99183E+01 -7.59083E-05 2.54499E-01 -1.53444E-04
Desired result:
54000 4.52402E+00 5.37331E+00 -5.37331E+00 -6.52528E-04 2.04301 +E-01 -1.07277E-03 54001 7.12575E+01 4.88288E+01 -4.88288E+01 -2.20964E-03 9.34513 +E-01 -1.76121E-03 54002 3.55673E+00 9.22908E+00 -9.22908E+00 1.05358E-04 1.78918E +-01 1.74279E-04 54003 2.71198E+00 5.04349E+00 -5.04349E+00 0 1.73257E+00 4.45 +074E+00 54004 2.23790E+00 3.46888E+00 -3.46888E+00 -1.95970E-05 5.09952 +E-02 -1.95518E-05 54005 4.14851E+00 1.99183E+01 -1.99183E+01 -7.59083E-05 2.54499 +E-01 -1.53444E-04
Can you help me?

In reply to How can I remove 0 from first line and empty space from the start of the following line and join them by Anonymous Monk

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 exploiting the Monastery: (3)
As of 2024-04-25 19:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found