So I've got this SAR output from a mainframe that I've ftp'd to my PC so I can parse it. But I
can't parse it--in fact, I can't read more than the first few lines of it before the program terminates.
After trying lots of stuff, I pared it down to a minimum:
use strict;
my $i;
open(DC08, '<c:\temp\dc08dl03a.txt');
open(DCOU, '>c:\temp\dc08dl03.txt');
DC: while (<DC08>) { print DCOU "$_\n"; }
close(DC08);
close(DCOU);
Over 3000 lines in that file, but only the first 57 copy. When I yank the offending line, another few copy, then it stops again. I could iterate out the offending lines, but hey! That's harder than doing the whole thing by hand!
So--I ftp'd the data and the script over to a UNIX node, and there, everything is copacetic.
Clearly, there's something in the input breaking Perl. Is it a bug in Build 628? Or is it a bug in 5.6.1? The UNIX server is running the venerable 5.003 (and will for some time, I'm sure.)
adamsj
These are my principles. If you don't like them, I have others. --Groucho Marx
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.