> -----Original Message----- > From: Nicolay A. Vasiliev [mailto:[EMAIL PROTECTED] > Sent: Friday, October 01, 2004 2:45 PM > To: [EMAIL PROTECTED] > Subject: Re: Becoming Disenheartened - Everyone talks about > Python and says Perl is old news. > > > To Randal and Chris. You all don't understand me. CGI is a module, > earlier wrote and stored in a separate files. I don't mean > such objects. > > Python and Ruby don't write the code for me. But look at this > Python code: > > s = "I am Perl guru"; > new_s = s.replace("Perl", "Python"); >
With this willing to treat everything as object you end up with Ugly code such as the following: http://www.python.org/cgi-bin/moinmoin/CgiScripts #!/usr/bin/env python import cgi print "Content-type: text/html" print print print """ <html> <head><title>Sample CGI Script</title></head> <body> <h3> Sample CGI Script </h3> """ form = cgi.FieldStorage() if form.has_key( "message" ): message = form["message"].value else: message = "(no message)" print """ <p>Previous message: %s</p> <p>form:</p> <form method="post" action="index.cgi"> <p>message: <input type="text" name="message"/></p> </form> </body> </html> """ % message That I let the beginners-list to show you how it can be nicer written in Perl :) José. **** DISCLAIMER **** "This e-mail and any attachment thereto may contain information which is confidential and/or protected by intellectual property rights and are intended for the sole use of the recipient(s) named above. Any use of the information contained herein (including, but not limited to, total or partial reproduction, communication or distribution in any form) by other persons than the designated recipient(s) is prohibited. If you have received this e-mail in error, please notify the sender either by telephone or by e-mail and delete the material from any computer". Thank you for your cooperation. For further information about Proximus mobile phone services please see our website at http://www.proximus.be or refer to any Proximus agent. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>