[Prev][Next][Index][Thread]
a very dumb and off-topic question, but I'll ask it anyway...
this is a perl question, so don't answer on the list... I deeply
appologize to marc for posting it here, but before subscribing to some
foreign mailing list or newsgroup and asking this and probably get flamed,
I'd like to be flamed by people I know and appreciate...
ok: I'm a total beginner at perl, so go easy on me!
I have a form for subscribing to multiple majordomo lists. the subscriber
ticks the boxes as needed and posts (see
http://ard.huji.ac.il/form-1.html). the group names in the old form where
marked both by an index and a unique name for a reason, so I
potentially have a bunch of variables called "20.grp20" through
"99.grp99". I want to keep this system because it allows for VERY easy
adding of more groups later to the form without changing the CGI.
anyway, I send a mail to majordomo, and in it I need a loop that will send
a line for each subscription. here goes:
for ($grploop=20;$grploop<=99;$grploop++)
{
$grpname = $grploop . '.grp' . $grploop;
if $FORM{$grpname} do
print MAIL "subscribe $FORM{$grpname} $FORM{'email'}\n" ;
}
but $FORM{} won't accept anything but a nice little string (like {'mail'})
as a value... what am I missing here?
----------------------------------------
Ira Abramov <ira@ard.huji.ac.il>
Hebrew University's Authority For R & D
http://ard.huji.ac.il (new URL!)
02-65-86696 / beeper 91826 at 058-212121