in reply to Populating the form

Then you would use HTML::Defaultify like so:
$output = "<html> <head> <title>name</title> </head> <body> <form name +=formName action="cgibin/name1.pl" method="POST"> my name is: <input type="text" name="text1" size="15"> My lastName is: <input type="text" name="text2" size=15> </form> </bod +y> </html>" $def_output = defaultify($output, text1 => "John Smith", text2 => "Smith" }
Then $def_output would contain your code, with the proper value= tags set.