Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: To split with spaces

by sundialsvc4 (Abbot)
on Aug 05, 2013 at 12:31 UTC ( #1047901=note: print w/replies, xml ) Need Help??

in reply to To split with spaces

Here are another couple of useful tips:

  • Use hexdump or a similar tool to examine the contents of the file byte-by-byte.   Don’t assume anything:   a “blank space” could be tabs, spaces, or even characters that are unprintable according to the internationalization (I18N) settings of whatever tool you may happen to be using.   When you are showing excerpts of such files to us, enclose them in <code> tags.   You can write a program to split according to any sort of bright-line rule.
  • Once you think you have a bright-line rule, write a script to prove it.   Take every assumption that you think holds true for the entire catalog of such files that you have, then write scripts that will survive only-if those assumptions are correct; otherwise they die in a meaningful way.   Run those scripts against a broad cross-section of the files.   Run them automatically against new files that come in.   (Sometimes you find that you are debugging, not only the programs that you wrote to consume the files, but the programs that other people wrote to produce them.)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1047901]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2018-01-22 09:21 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (233 votes). Check out past polls.