in reply to Re^2: To split with spaces
in thread To split with spaces

Now that we have a format making sense, i.e. a fixed-column format, this definitely looks like a work for the substr or unpack function, the problem is to find the right parameters (offset and lenbgth) to retrieve your fields. I can't make a test right now, but will come back to you when I can.

UPDATE: actually, I had not seen that when I posted the above 3 minutes ago, but Davido and others have already given a solution. Probably no point to come back and give the same.

Replies are listed 'Best First'.
Re^4: To split with spaces
by gorkemsarikaya (Novice) on Aug 05, 2013 at 21:02 UTC

    Thank you, but I tried and tested substr and unpack functions. These are not working. Because our input data is not a fixed-column format. Some of columns have whitespace characters and substr and unpack functions ignore these whitespace characters and pick up next columns value like that:
    0
    0
    43
    0
    0
    0
    instead of this column that I want:
    0
    0

    0