#!/usr/local/bin/perl -T # Standalone demo for repeatable html input field. use warnings; use strict; use CGI; sub escapeHTML { my($v) = @_; $v =~ s/&/&/g; $v =~ s/</g; $v =~ s/>/>/g; $v =~ s/"/"/g; $v; } our(@nam); our $ownurl = "cpdemo.cgi"; sub hparm { @nam = grep { length } CGI::param("fld-nam"); } sub htop { print qq{Content-Type: text/html; charset=utf-8\n}, qq{\n}, qq{\n}, qq{\n}, q{
\n}; } sub hbot { print qq{\n}; } sub hmain { ${^TAINT} or die "run in taint mode (perl -T) please"; hparm; htop; hform; hout; hbot; } hmain; 1; __END__