in reply to Re^2: Pre-Populating an HTML form
in thread Pre-Populating an HTML form

Here's a very small example of the method I described.
#!/usr/bin/perl use strict; use warnings; use CGI (); my $cgi = CGI->new(); my $infile = '/path/to/file.html'; open my ($fh), '<', $infile or die "Couldn't open $infile! $!"; read $fh, my ($html), -s $infile or die "Couldn't read $infile! $!"; close $fh or die "Couldn't close $infile! $!"; my $generated_password = function_to_generate_password(); $html =~ s/some_special_target_in_your_html_file/$generated_password/s +gi; print $cgi->header(); print $html;
If you have any questions, don't hesitate to ask!

---
It's all fine and dandy until someone has to look at the code.