$report{}[0]="DOB,Name,Empid,salary,Gross_salary,Department,Company"; $report{}[1]="Month,NET_Salary,"; #### subroutine{ my @data; my $table; open( F, "$File" ) || die("Could not open $File"); while ( my $line = ) { chomp($line); push( @data,( split /[,\n]/, $line));} close(F); $table .= ""; for my $i ( 0 .. $#data ) { $table .= ""; for ( @data[$i]){ $table .= "\r\n"; } $table .= ""; } $table .= "
$_
"; } ##
## MessageFile MessageFile MessageFile MessageFile MessageFile #### DOB Name Empid salary Gross_salary Department Company Month NET_Salary