In reply to Tye's comments... I appreciate the in-depth commentary. This is where I'm going to learn some real perl. To give some background that might clear up why I wrote the code the way I did: I'm running perl on a Win98 system. I'm writing a piece of code that accepts a collection of text files from a legacy database along with a configuration file and generates a series of reports in MS Excel. The text files are comma-delimited and in a specific, reliable format (for example, no '\n' at the end of file), allowing for some of the assumptions I made. I tested the code above on several of these files and achieved the correct results each time. The reports are extremely time-sensitive, and routinely sum to over 40MB of data. I need the routines to be fast and quick - although I take to heart Tye's comment that fast code is less important than correct code. One question I still have: what effect does binmode have on the data? In WinBlows it looks as though I still end up with text in my final array, regardless of whether I use binmode. In that case, switching to binmode and gaining the speed increase seems reasonable. Thanks.

In reply to Re: Why use <$fh> at all? by cluka
in thread Why use <$fh> at all? by cluka

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.