http://www.perlmonks.org?node_id=65914


in reply to Handling Dynamically Created Forms

I agree with what OeufMayo said about using CGI.pm, and recommend you use buckaducks excellent code-snippet.

This code is maybe closer to what you had in mind:

use CGI; $query = new CGI; while(1) { $i++; $value = $query->param("name$i"); last if ! $value; # do something with value };

but BEWARE: this has several problems. for example: empty strings are treated as no value at all and break the loop!

--
Brigitte    'I never met a chocolate I didnt like'    Jellinek
http://www.horus.com/~bjelli/         http://perlwelt.horus.at