Front page | perl.beginners |
Postings from March 2002
param function
Thread Next
From:
Mariusz
Date:
March 15, 2002 16:27
Subject:
param function
Message ID:
OE59LwE87lt2cepZDg9000038a4@hotmail.com
hi,
I have a html form with over 100 fields, is there a quick way to assign them in the way that the scalar name becomes the name of the field and the value of the field is being assigned to that scalar? I know I can just type it one by one:
$name = param('name');
$lastname = param('lastname');
$age = param('age'); ...
, but there must a prettier way to do it:) I was thinking:
@keys = param();
foreach $key (@keys){
my $value = param($key);
}
but that would run through the loop and leave me only with one last pair of retreived $value = "last_field_from_my_form" that I could refer to later in my script. However, I need all of the pairs.
Thanks for help.
Mariusz
PS. By the way, this is a great list, you guys are very helpful and newbies like me really appreciate what you do.
Thread Next
-
param function
by Mariusz