I have this perl script its runs fine. My query is how do email this output. I am not good with using arrays.
Here is my code.
All i want is to send output which i am getting via array in email.
$query1 = $db4->prepare("SELECT COUNT (*), (
CASE WHEN PICSTATUS = '11' then 'Transfer Rejected'
when picstatus = '12' then 'Transfer Cancelled'
when picstatus = '20' then 'New Sale'
when picstatus = '70' then 'Pricing Accepted'
when picstatus = '72' then 'Sale Confirmed'
when picstatus = '80' then 'Ready for Transfer'
when picstatus = '90' then 'Transfer in progress'
) as STATUS FROM PROCONSUMER WHERE PICSTATUS NOT IN (100,10) GROUP BY PICSTATUS " );
while (@array = $query1->fetchrow_array)
print "$array = $array\n";
#($ca) = $array;
my $subject = " Daily stats";
my $message = " Customer Statistics \n =======================================================================
`/usr/bin/sendEmail -f stats\@abc.com.au -t abc\@abc.com.au -u $subject -s localhost -m " $message \n " `;
print "email sent";