http://www.perlmonks.org?node_id=205602

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

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?