[geeks] Solaris 10 install size

Charles Shannon Hendrix shannon at widomaker.com
Sun Jul 23 02:43:09 CDT 2006


Fri, 14 Jul 2006 @ 12:42 -0500, Bill Bradford said:

> On Fri, Jul 14, 2006 at 01:25:10PM -0400, der Mouse wrote:
> > Thanks, Bill Bradford.  A ton.  If you ever need a spot of C coding
> > help or a (mostly NetBSD) sysadmin hand, just let me know.
> 
> Today I'm just fighting with perl (and going crosseyed).
> 
> See the following:
> 
> http://www.mrbill.net/goodman/all.txt
> 
> This is the output (from all.html) produced by this Perl script:
> 
> http://www.mrbill.net/goodman/test.perl.txt
> 
> However, I need to turn that output into SQL INSERT statements (most
> likely for use w/MySQL).  Anybody have suggestions for this other than
> SQL::Abstract?

Maybe tell us what you are trying to do.

Also, is this a one time thing, or something you'll run N times, or is
it permanent?

Does performance matter?

Why are you looking at classes?  

There are several ways to do this.

It occurs to me the simplest way would be to avoid any big classes, and
just bash strings:

	$basesql = "insert into <database> values (%s, %s, %s,...)";
	while (loop through data structure) 
	{
		$sql = sprintf($basesql,$var1,$var2,$var3,...);
		$dbh->do($sql);
	}

There are different and faster ways like using bound variable statements
and that sort of thing, but that's up to you and your exact needs.  It
all boils down to a simple loop and string bashing.

Given how simple this is, I don't see a lot of point in messing about
with complex classes.


-- 
shannon "AT" widomaker.com -- [Well, I have entered the "metallic years." 
Silver in my hair, gold in my teeth, lead in my ass... -- Sheldon Hall in
the rescue list]



More information about the geeks mailing list