[ic] Looping through form variables in [perl] tag

Richard Templet richard at endpoint.com
Tue Apr 8 21:47:47 CDT 2008


tom at readyink.com wrote:
> I should be able to do
>
> [tmp][perl]
> while (($key, $value) = each %CGI::values) { }
>
> ## or
>
> foreach my $key ( keys %CGI::values ) {}
> [/perl][/tmp]
>
>   
because I see code like that in the core, but it doesn't work. Can
> someone tell me how to loop through the form variables?
>
> thank you,
> tom friedel
>
>
>   

Tom,

You should be able to do this:

[perl]

foreach my $key ( keys $CGI ) {}

[/perl]

Richard Templet
End Point Corp.
(919) 300-7303




More information about the interchange-users mailing list