in reply to Better Code Solution needed for the below CSV file parsing and printing in HTML format
You get different output because you forgot to add FH1 to some of the print statements in the second script
By the way, the loop could be written like this:
foreach (@rec) { print FH1 "\t <td>". $_ . '</td>'; }
Better to read and less error prone (as long as you don't want to add or delete to the array inside the loop)
|
|---|