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

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.)


Comment on Re: To split with spaces

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (13)
As of 2014-12-20 16:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (96 votes), past polls