Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Bug in script when users use long names

by boftx (Chaplain)
on Sep 25, 2013 at 04:47 UTC ( #1055604=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Bug in script when users use long names
in thread Bug in script when users use long names

Looking at this further I notice that there doesn't appear to be any kind of format version number in the header info. Shame on your source for that. But even so, it appears to a simple matter to just check to see if the Date/Time header is present in the first header line and if not you know you are dealing with (what I presume is) the newer data format.

On a side note, this kind of data format has been largely replaced by XML for B2B data exchange. Some vendors have opted for a CSV format, but it is just simply amazing to see how many programmers can not generate a proper CSV file, or an XML file for that matter. There is still something to be said for a fixed length record after all. :)

On time, cheap, compliant with final specs. Pick two.


Comment on Re^3: Bug in script when users use long names
Re^4: Bug in script when users use long names
by soonix (Curate) on Sep 25, 2013 at 09:42 UTC

    To me, it looks more like both are the same, just the "Name" column wider, and the line breaks inserted by some tool, that makes it more human readable but more difficult for automatic processes (my guess is Windows, perhaps Powershell?)

    Sparky: perhaps your source can output CSV or XML or something better parseable?

    Otherwise, you could record the position (line/column) of the relevant column header ("Creation Date/Time") and follow boftx's advice.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2014-09-19 01:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (129 votes), past polls