develooper Front page | perl.beginners | Postings from January 2002

Re: What's wrong with this?

Thread Previous | Thread Next
Jeff 'japhy' Pinyan
January 24, 2002 14:16
Re: What's wrong with this?
Message ID:
On Jan 24, Eduardo Cancino said:

>Japhy, may i call u that way?, in this part...

Yes, the name "japhy" is fine -- I prefer its usage as my internet
persona, or whatever you'd like to call it.  It's easier to remember than
my real name, at any rate.

># inicia variables.
>> >$to = "info\";
>> >$from = "info\";
>> >$subject = "Comentarios Sitio Web";
>> >
>> ># manda el mail.
>> >open (MAIL,"|mail $to");
>> >print MAIL <<"END_top";
>> >
>> >"To: $to
>> >Reply-To: $to:
>> >Subject: $subject"
>> >
>> >END_top
>> That's not working, I can promise you that.
>...the mail is being received.

For the wrong reason.  Does it have a Reply-To field?  I doubt it -- not
in the headers, at least.  And does it have a Subject field?  I doubt it
-- not in the headers, at least.

>With can I do this a lot easier???

With, you can read the form data SIMPLY, with ONE function:

  use CGI 'param';

Now, to get what the user entered for "age", you'd do:

  $foo = param 'age';

If you want to loop over all the form fields, you'd do:

  for $field (param()) {
    print "$field => ", param($field), "<br>\n";

>How could I use de, there is a tutorial or something I can read about
>it??? comes with its own documentation.

  perldoc CGI also comes WITH Perl.  If you have Perl, you have it.

Jeff "japhy" Pinyan
RPI Acacia brother #734
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About