Code and Output Follows: #!/usr/bin/perl use strict; use warnings; use diagnostics; use Data::Dumper; use DBI; my $dbargs = {AutoCommit => 0,PrintError => 1}; my $dbc = DBI->connect("dbi:SQLite:dbname=da_db.db","","",$dbargs); # get the default po my $sth = $dbc->prepare('select * from der_pos where poid = '0'); $sth->execute; my $po = $sth->fetchrow_hashref; my $tmp = ''; # build a string and add some commas while ( my ($key, $value) = each(%$po)) { if ($tmp) { $tmp = $tmp . ' , ';} $tmp = $tmp . "$key => " . (($value) ? qq("$value") : q("a")); } #print $tmp . "\n"; my %pohash = (); %hash = ($tmp); print Dumper(%pohash); Output Follows: Odd number of elements in hash assignment at ./test.pl line 25 (#1) (W misc) You specified an odd number of elements to initialize a hash, which is odd, because hashes come in key/value pairs. $VAR1 = 'Comments => "a" , InstallAddID => "a" , County => "a" , AribaToID => "a" , AribaFromID => "a" , ProcessStatus => "a" , DeliverToAddID => "a" , HasBadPart => "a" , ShipToCode => "a" , AribaPO => "Default" , DeptidCode => "a" , OrderType => "a" , PODateProcessed => "2010-06-29 10:53:25" , PODate => "a" , ShippingNotes => "a" , RequisitionNum => "a" , Mode => "a" , StoreNumber => "a" , Replaced => "a" , Target => "all" , OrderNotes => "a" , ReqDeliveryDate => "2010-06-29 10:53:25" , Iteration => "a" , LineItemCount => "a" , POID => "a" , JamcoPO => "a" , DebugData => "a" , POTotal => "a"'; $VAR2 = undef; Issuing rollback() due to DESTROY without explicit disconnect() of DBD::SQLite::db handle dbname=/da_db.db.