Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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

by Sparky (Initiate)
on Sep 25, 2013 at 00:42 UTC ( #1055575=note: print w/replies, xml ) Need Help??

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

Thanks Boftx, I'll check it out. Strange,pack/unpack never came up while I was figuring this out in all my perl books.

  • Comment on Re^2: Bug in script when users use long names

Replies are listed 'Best First'.
Re^3: Bug in script when users use long names
by boftx (Deacon) on Sep 25, 2013 at 04:47 UTC

    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.

      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.

Re^3: Bug in script when users use long names
by Anonymous Monk on Sep 25, 2013 at 01:23 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1055575]
marto waves
[Marshall]: marto howdy!
[marto]: Hey there
[Marshall]: hope we get a good answer to Script stopped working... this OP is making serious efforts to solve problem on his own.
[Marshall]: I've become frustrated lately with some OP's.

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2018-03-18 12:53 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (230 votes). Check out past polls.