I have been folowing the Reading form a database guide at Reading from a database and have ran into a problem that I can not find an answer for. I have checked the FAQs and did a search but nothing really came up that helped. Like the guide shows I am tryign to use the prepare statement to prepare and SQL command but when I run the script I get the error: Undefined subroutine &main::prepare called at D:\crystalreverie.com\www\members\signup.pl line 28. Line 28 contains this code: $sth = prepare (qq~execute new_registrations $uid $pass $charactername $realname $email~) or die "Could not prepare statement: $DBI::errstr; stopped"; What would be causing this?

Edited by Chady -- fixed URL.


In reply to Undefined subroutine &main::prepare ?? by Eagle_f91

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.