in reply to < Woes
#!/usr/bin/perl use strict; use warnings; my $text; my %h_self = (form_data =>{page=>'confirmation'}); while(<DATA>){ if (m/\<!-- Begin Perl Block --\>/i) { my $perlcode = ''; # Pull in all the perl code while (<DATA>) { # This is the end of the block last if m/\<!-- End Perl Block --\>/i; $perlcode .= $_; } # Execute the anonymous sub warn &{eval $perlcode;}; } } __DATA__ BLAH <!-- Begin Perl Block --> sub { $text = ''; if ($h_self{form_data}{page} =~ /confirmation|application/i) { $text .= qq[<style type="text/css"> body {font-size: 8pt;font-family: Arial, Helvetica;} table {font-size: 8pt;font-family: Arial, Helvetica;} tr {font-size: 8pt;font-family: Arial, Helvetica;} td {font-size: 8pt;font-family: Arial, Helvetica;} select {font-size: 8pt;font-family: Arial, Helvetica;} input {font-size: 8pt;font-family: Arial, Helvetica;} form {font-size: 8pt;font-family: Arial, Helvetica;} div {font-size: 8pt;font-family: Arial, Helvetica;} p {font-size: 8pt;font-family: Arial, Helvetica;} .red {font-weight: bold;font-size: 10pt;color: red;text-align:right;} .black {font-weight: bold;font-size: 10pt;color: black;text-align:righ +t;} .backfill {background-color:003399;text-align:center;color:white;font- +weight:bold;border: 1px solid white;} .cell {border: 1px solid white;} .edit {width: 50;} </style>]; } return $text; } <!-- End Perl Block --> STUFF
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE:RE: < Woes
by rongoral (Beadle) on Jul 03, 2005 at 21:47 UTC |