Hi,
I'm reading a file and trying to write it out with the current date in the file name.
But I'm getting an error when trying to run this code
use D_Db;
my $dbh = D_Db::connect('EDW');
my $Curr_dt=D_Dates::get_curr_ccyy_mm_dd({dbh=>$dbh});
my $sth4BobExt=$dbh->prepare("Select * from TableX");
$sth4BobExt->execute();
while ( my @BobExtrow = $sth4BobExt -> fetchrow_array())
{
#print @BobExtrow;
my $Bob_Ext=$BobExtrow[0];
#print "\n$Bob_Ext\n";
my $d=`date +%F|awk -F '-' '{print \$1 \$2 \$3}'`;
chomp($d);
D_OS::run_cmd('echo "@BobExtrow" >> /data/hosstg/TableX_T-$d.txt');
}