#!/usr/bin/perl use strict; use warnings; use CGI; use Template; my $cgi = CGI->new; my $template_vars; if ( $cgi->param ) { foreach my $var ( qw/ magnification letter x y / ) { $template_vars->{$var} = $cgi->param( $var =~ /^[xy]$/ ? "picture.$var" : $var ); } } my $tt = Template->new; print $cgi->header( -type => 'text/html', -charset => 'utf-8', ); $tt->process( \*DATA,$template_vars ) or warn $tt->error; __DATA__
Sorry, this isn't very exciting!