I went ahead and made changes based on your suggestions. Here is what I now have.

sub NewTable { $table = $_[0]; $column = $_[1]; $indexname = $_[2]; $sqltext = "CREATE TABLE $table ( id INTEGER PRIMARY KEY AUTOINCREMENT, $column VARCHAR)"; $dbh->do($sqltext); $insertrow = $dbh->prepare ("INSERT into $table ($column) values(?) +"); $insertrow->execute("Dummy"); $sqltext = "CREATE INDEX $indexname ON $table ($column)"; $dbh->do ($sqltext); $id = $dbh->last_insert_id(undef, undef, undef, undef); }
Box, bookleafplate and other tables not seen need to be separat tables for normalization purposes, for example, a (book in this case) may have come from a box labeled 'Skowhegan Me No 345' and may or may not have a bookleafplate ( fronts piece image ). I have one table which contains all of the unique information, and then id's to tables where duplication may occur, thus the need for the last_insert_id call.
I spent many years using Sybase, Oracle and other relational databases, but not within perl until now. I like SQLite because all I have to worry about is one file which makes for easy (physical) portability.

I did use perl for a while shortly after it emerged in the 80's while working on a CAD/CAM software project, but only now have become serious about it.
Ted Stefanik (while at MIT) reviewed the first PERL book for Larry Wall & Tim O'Reilly (who's book publishing company was located at Fresh Pond in Cambridge Ma. at that time)
I worked with him, and it is because of him that I started using perl. Ted has contributed a lot to perl, some of his early work is still available on the web see: http://stuff.mit.edu:8001/afs/net/dev/dev/ project/tcl/tcl-6.7/perl-tcl-debug"
Again, thanks a lot for your very useful advise.
Largins


In reply to Re^4: Concatenation of scaler reference by Largins
in thread Concatenation of scaler reference by Largins

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.