Thread Daten in Loop parsen
(21 answers)
Opened by gmafx at 2010-03-12 16:57
wenn ich dich richtig verstehe:
Code (perl): (dl
)
1 2 3 4 5 6 7 8 # ungetestet my @upload_fields = map { m/^File(\d+)/ ? $1 : () } $cgi->param; # enthält jetzt die zahlen for my $num (@upload_fields) { my $file = $cgi->param("Description$num"); my $upload_filehandle = $cgi->upload("File$num"); ... } Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live. -- Damian Conway in "Perl Best Practices"
lesen: ![]() ![]() View full thread Daten in Loop parsen |