Hi
Thanks for the suggestions. There are a lot of helpful people here!
I tried to catch errors like this:
system(" cat $file | sort -t\\| +1 -2 > $file.out ") ||
die "can't sort the file: $!";
... and I also tried $?. That's the creepy thing - it never even gets that far. It just skips the whole statement altogether.
I agree with your thoughts about virtual memory, and in fact this server has had some memory problems in the past. It just seems odd to me that I'm not getting some "out of memory" error (which I've seen before on this server) or even an out-and-out crash of the script. I need something to take to the Unix admins to convince them that there's a problem with the server (there are a number of production databases on there, so they won't reboot or anything like that w/o a good reason).
Oh, I forgot to mention that if I take the "sort" statement and put it in a separate Perl script, then run that to sort the file, it works fine. Which again leads me down the virtual memory path. In the short term, maybe I'll have to do the data processing and then the sort in two separate scripts, called up by a shell script or something. That's ugly but I'll bet it will work.
Thanks!
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.