RE: Becoming Disenheartened - Everyone talks about Python and says Perl is old news.

2004-10-01 Thread Doug Lewis
I won't even reply to the person that said, perl is old news.  And that everyone talks 
about Python.  That is just stupid.  Most people either talk about C, C++, or Java.  
Then comes perl.
 
Perl is still way more talked about than Python In my Experience.
 
Perl makes things much simpler.


NYIMI Jose (BMB) [EMAIL PROTECTED] wrote:


 -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 






Sample CGI Script 


form = cgi.FieldStorage()
if form.has_key( message ):
message = form[message].value
else:
message = (no message)

print 


Previous message: %s



form:




message:  [input] 






 % 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]





-
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!

Re: Passing options to command in a system call

2004-10-01 Thread Doug Lewis
I haven't used the wget program before, but try adding a comma after your -O.  I did 
that and I got it working.

Jan Eden [EMAIL PROTECTED] wrote:Hi,

I try to call wget using system like this:

system(wget -O /dev/null, http://janeden.org/test/file.txt;);

This does not work:

Can't exec wget -O /dev/null: No such file or directory at ./wgetrec.pl line 6.

Ok, so how about this:

system(wget, -O /dev/null http://janeden.org/test/file.txt;);

No go:

wget: missing URL

Without additional options,

system(wget, http://janeden.org/test/file.txt;);

works fine.

How can I pass an option to system's first argument in a setting like this?

(I know I can use a module instead of calling wget, but this is a more general issue.)

Thanks,

Jan
-- 
If all else fails read the instructions. - Donald Knuth

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Re: Two easy questions.

2004-09-21 Thread Doug Lewis

Your answer actually lies in the system that you are using first.  The reason the CGI 
scripts hold the .cgi extension.  Is because that is what your webserver uses to grab 
your CGI scripts from your CGI directory.
 
As for using perl myscript.  That is a windows thing.  If I remember correctly  (Don't 
qoute me on this, because I don't use perl on windows.) but if you run your script in 
the directory that you have perl installed in, you don't need the perl part.
 
Hopefully I have explained it clearly enough, sorry it is rather late, and I am 
friggin tired, if when I read this in th morning it sounds shitty, I will reword it 
and re-email it.
Drue Reeves [EMAIL PROTECTED] wrote:


Truly newbie questions

Why do some scripts have a CGI extension while other a .pl and still other a .plx? 
Does the .cgi extension give it some web characteristics?

Is there a way to run my script without specifying perl before the script? In other 
words, I want to type c:\myscript.plx instead of c:\perl myscript.plx.

Thanks,

Drue



-
Do you Yahoo!?
vote.yahoo.com - Register online to vote today!