my $_todayIs = Format_Date_For_Viewing(time(),"day_only"); my $sth = $dbh->prepare(qq{SELECT * FROM `autoship_orders` WHERE `day` = ?}); $sth->execute($_todayIs); my $_cnt = 0; my $_suc = 0; my $_fai = 0; while(my $_sao = $sth->fetchrow_hashref()) { $_cnt++; my %_billingInfo = (); my $sth2 = $dbh->prepare(qq{SELECT * FROM `secured_data` WHERE `sid` = ? AND `Id` = ?}); $sth2->execute($_sao->{sid},$_sao->{Id}); my $_sd = $sth2->fetchrow_hashref(); $sth2->finish(); $sth2 = $dbh->prepare(qq{SELECT * FROM `reg_members` WHERE `Id` = ?}); $sth2->execute($_sao->{Id}); my $_regmem = $sth2->fetchrow_hashref(); $sth2->finish(); # Get Secure Data my $_billing = $_sd->{p11}; $_billing = decryptdata($_billing,$_encryptionKey); $_billing = decrypt($_billing); # Bunch of other code.... decryption ........ my @_billingData = split(/;/, $_billing); ($_billingFname,$_billingLname) = split / /, $_billingData[0], 2; $_billingInfo{fname} = $_billingFname; $_billingInfo{lname} = $_billingLname; $_billingInfo{address} = $_billingData[1]; # other code setting some other hash keys in %_billingInfo my $_cardCharged = chargeCard(\%_billingInfo); # That is what I have passed # Here is my chargeCard sub (top of it anyways): sub chargeCard { %_billingInfo = shift; #### my $_debug = 1; open(BUG,">>/home/path/to/file") if $_debug; seek(BUG, 0, 2) if $_debug; print BUG qq~Started debugging at line: ~ . __LINE__ . "\n" if $_debug; if($_debug) { foreach my $key (keys (%_billingInfo)) { print BUG escapeHTML ($key) . " = " . escapeHTML ($_billingInfo{$key}) . "\n"; } } #### my $_cardCharged = chargeCard($_billingInfo); sub chargeCard { %_billingInfo = shift; # AND my $_cardCharged = chargeCard(\$_billingInfo); sub chargeCard { %_billingInfo = shift; # AND my $_cardCharged = chargeCard(%_billingInfo); sub chargeCard { %_billingInfo = shift; # AND my $_cardCharged = chargeCard(\%_billingInfo); sub chargeCard { %_billingInfo = shift; # AND every other way I can think of...