> 
> I think I better see the context at this point.
> note, as I presume you did

The issue is resolved, but for the die hards here goes...
I'm wanted to figure out my method of attack before I did the whole 
thing but here is an example that will illustrate the basic idea hopefully:

#!/usr/bin/perl -w

use strict;
use DBI;

my $dbh->connect(...) or die ....;

my ($def_foo,$def_bar,$def_joe,$def_mama) = $dbh->selectrow_array("SELECT 
Foo,Bar,Joe,Mama FROM Default_Settings");

for(@{$dbh->selectall_arrayref("SELECT Foo,Bar,Joe,Mama,Use_Def FROM Whatsits WHERE 
Blah=1234")}) {
        my ($foo,$bar,$joe,$mama,$use_def) = @{$_};
        my $foo_use = $foo || ($use_def && $def_foo) || '';
        my $bar_use = $bar || ($use_def && $def_bar) || '';
        my $joe_use = $joe || ($use_def && $def_joe) || '';
        my $mama_use = $mama || ($use_def && $def_mama) || '';
        print "$foo_use - $bar_use $joe_use $mam_use\n"; # or do whatever with it
}
$dbh->disconnect();

> 

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to