my $nn; my $vn = Paul; my $array_ref = [ [ qw( id nachname vorname ) ], [ 1, 'Lohan', 'Lindsay' ], [ 2, undef, 'Karl' ], # gut [ 3, $nn, $vn ], # auch gut [ 4, ,'Peter' ], # nicht gut ]; $dbh->do( "CREATE TEMP TABLE $table AS import( ? )", {}, $array_ref );