[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: Perl Doubt



Adityan Murthy proclaimed:
> I have a file called read_art.pl which takes a parameter for the name of the
> file and reads the article.  i want to have a rate this article link which
> rates it. for that, i plan to write a file, say rateit.pl now, when i click
> on rate it, it will call the perl file, say as, rateit.pl?val=2 (2 is the
> name of the article file). this file (rateit.pl) will contain the form
> required to rate it. now i want the same file to create the form and do the
> rating. that means that when i rate, it will call rateit.pl?val=2&rating=5.
> so, how do i make the same pl file distinguish the two diff calls?

By passing it a third name=value pair which tells the perl script which way
it is being called.

> Also, what is "use CGI"?  Seems similar to creating an object of a class in
> C++.  Where do i get info on the various functions in CGI?

man CGI

CGI.pm is an excellent perl module that you can use to parse HTML forms and
so many more things.

Thaths
-- 
"This is a very, very proud day for us! Especially me, your father, me, 
beat City Hall! It's just like David and Goliath, only this time, David
                   won!" -- Homer J. Simpson
Sudhakar C13n    http://www.aunet.org/thaths/    Lead Indentured Slave