Just to clear up my previous post, I think I've got a handle on converting/importing the data from my flat file DB to MySQL. My question is, what changes do I need to make to my Perl script so that it connects to and reads/writes to MySQL rather than the flatfile? 2 parts:

1. Setup/config -- I know there's a:

use mysql;

statement, but what else do I need?


2. Declaring/calling/reading/writing values -- in my flat file, I use simple commands such as:

$config{'regdir'} = 'reg';
my ($title, $reserve, $inc, $desc)...
if ($password,$email,$add1,$add2)...
print $config{'header'};

Is the format the same for interacting with MySQL values?

Thanks.

In reply to convert flat file to mysql -- again by garyj

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.