Okay lets Open the database
------------------------
open (ORGDB,"<$database");
@ODB=<ORGDB>;
close (ORGDB);
##Split and read the contents of database
foreach $rec (@ODB){
chomp($rec);
($employee_name,$pay)=split(/\|/,$rec);
print "$employee_name" - $pay\n";
-------------------------
All the above code is working fine. The problem is I want to
calculate all the $pay records in the End.
e.g. TOTAL PAY given to employees.
How I can calculate/add all the $pay records in the database and
show them at the last line??
Any help?
Thanks and regards to all,
Zeshan.
------------------------
open (ORGDB,"<$database");
@ODB=<ORGDB>;
close (ORGDB);
##Split and read the contents of database
foreach $rec (@ODB){
chomp($rec);
($employee_name,$pay)=split(/\|/,$rec);
print "$employee_name" - $pay\n";
-------------------------
All the above code is working fine. The problem is I want to
calculate all the $pay records in the End.
e.g. TOTAL PAY given to employees.
How I can calculate/add all the $pay records in the database and
show them at the last line??
Any help?
Thanks and regards to all,
Zeshan.