Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Better Code Solution needed for the below CSV file parsing and printing in HTML format

by ww (Archbishop)
on Oct 14, 2008 at 13:06 UTC ( [id://716975]=note: print w/replies, xml ) Need Help??


in reply to Better Code Solution needed for the below CSV file parsing and printing in HTML format

Unless this is homework, there are only rare occasions when "with out (sic) using modules" is a valid reason for eschewing tried and tested means of solving your problem.

Moreover, if you look closely at the .html output you posted, you'll note that it's NOT valid:

...<table order=1> <tr> <td>ID</td> <td>NAME</td> <td>AGE</td> # </tr> missing here <tr> <td>1</td> <td>Alex</td> ...

NOR do I see any ready explanation of how your code(1) could have produced this output. Did you cut and paste accurately? And what, in your view, causes the second to fail as it does? That may (update: already answered by jethro) help you ascertain your problem without further coaching.

Finally, perhaps you can explain what you mean by "...it should be generic not like method1."

  • Comment on Re: Better Code Solution needed for the below CSV file parsing and printing in HTML format
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://716975]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (10)
As of 2024-04-23 14:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found