I actually use CSV for data store that I want to update and query. It offers me a fast way to manually update the file at the same time. Writing a program to run UPDATE TABLE WITH VALUE = 'foo' WHERE KEY = 'bar' when I can just go in with vi and tweak it ... just seems like a win to me ;-)

(Not that I recommend this for all, or even many, uses ... especially live production ones, but you did say "there's not much reason to use them" - I think this one can be significant if it applies.)

Update: perrin is right - I don't do this for CGI scripts, although I do use this in some statically-generated code whose data store isn't updated via code at all. I may move this to be dynamically generated at some point in the future, but the data store will likely remain read-only as far as the web app is concerned.


In reply to Re^2: To learn to search flat files or to cheat... by Tanktalus
in thread To learn to search flat files or to cheat... by stonecolddevin

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.