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

Re^2: New to me crash message

by hsmyers (Canon)
on Apr 22, 2009 at 14:32 UTC ( #759293=note: print w/ replies, xml ) Need Help??


in reply to Re: New to me crash message
in thread New to me crash message

Improvements also very welcome. Much of this code was written in quick and dirty mode, sensible re factoring need not apply. While anything is possible, this is the second part of two scripts, the first writes the file this one reads at an earlier point, the one with '|' as divider so at least that is unlikely. Thanks for the better design suggestions! I'm thinking that the best chance for a 'change' as smoking gun is a significant jump in data size. This is of course complicated by the time it takes to process a file of large size (hours--- companion takes the longest portion).

--hsm

"Never try to teach a pig to sing...it wastes your time and it annoys the pig."


Comment on Re^2: New to me crash message
Re^3: New to me crash message
by graff (Chancellor) on Apr 22, 2009 at 18:27 UTC
    ... this is the second part of two scripts, the first writes the file this one reads at an earlier point, the one with '|' as divider so at least that is unlikely.

    In my experience, a statement like "that is unlikely" doesn't suffice for debugging the sort of problem you're having. Only testing will suffice. Test the output of that first script for the data set in question, and confirm that every record matches  /\S\|\S/ .

    You can also create a small test set of data for input to the OP script, include a record that does not match that regex, and see what happens. If it blows up, that's a good cue for adding some defensive code in the OP script, to do something sensible when such data comes in (skip the record or die, with a suitable message to stderr).

      A little like asking the husband for his fingerprints to rule him out. While it may upset him, it can in fact actually rule the poor guy out. And in the code, would be one less thing to worry about. Good suggestion.

      --hsm

      "Never try to teach a pig to sing...it wastes your time and it annoys the pig."

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (11)
As of 2014-12-17 22:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (39 votes), past polls