my $D = new bpoStub; . . . $sql = "select DBCompNum from FieldMap where DBTable=\"$DBTable\" and FormID = $FormID group by DBCompNum"; @rowscomp = $D->select($sql); for $countc ( 1 .. $#rowscomp ) { . . . } #### use DBI; . . . my $sql = 'INSERT INTO ' . $table . '(title, description, filename, path) VALUES (?, ?, ?)'; my $sth = $dbh->prepare($sql); while ($some_condition) { $sth->execute( $title, $description, $filename, $storagePath ); # do stuff which modifies condition and perhaps # the insertion values } #### if ( $Type{$DBCol} =~ /numeric|float|int|money/ ) {...} #### if ( $Type{$DBCol} =~ /^numeric|float|int|money/o ) {...}