in reply to Why use HTML instead of CGI? (code, discussion)
Not so bad as it stands, as long as you understand array references and hash references. But what if you don't? Early in my Perl career I gave up in frustration in the middle of some nested tables and just cut-and-pasted some existing HTML code. And it worked.print table({-border=>undef}, caption('When Should You Eat Your Vegetables?'), Tr({-align=>CENTER,-valign=>TOP}, [ th(['Vegetable', 'Breakfast','Lunch','Dinner']), td(['Tomatoes' , 'no', 'yes', 'yes']), td(['Broccoli' , 'no', 'no', 'yes']), td(['Onions' , 'yes','yes', 'yes']) ] ) );
I wouldn't do that today (in fact, I would probably now use a module such as HTML::Table or Data::Table for most HTML tables), and I have since revised most of my older code. But I'll admit that there were times when I used plain HTML to just get the job done. Not because I thought it was superior, but because I was still learning. And there's nothing wrong with that. (I hope.)
buckaduck
|
|---|