in reply to Re^2: Pre-Populating an HTML form
in thread Pre-Populating an HTML form
If you have any questions, don't hesitate to ask!#!/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;
|
|---|