"I would start by building up an array of hashes. The array represents the lines from the csv-file, and the hashes is the data on each line." So you would load the whole csv file into memory? "Iterating over the csv file you decide if the current line is to be included or treated special." So now I have only parts of the csv file in memory? So if I searched to foo I would only then have the lines that have foo in then in my array? What about editing? In my older even worse write of this (kept track of a mailing list) I would edit the item based on line number. I guess I could put the line number into my hash in the array though. I guess I am not really seeing how this cleans it up much. I might try it though, I will think about it some more. I have just been changing it about so that all the url options go into %options. That is helping a bit. I have also tried to get rid of some of the global vars that are not used anymore. Then I put my page_list and page_search right into the "if ($options{search}){" and else. I put head foot and outside of the if statement. Its helping a little. Also what is "AoH"? Thanks!

In reply to Re^2: tt2 with perl cgi and a csv file by Gokee2
in thread tt2 with perl cgi and a csv file by Gokee2

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.