#!/usr/bin/perl -w # Formular.pl sends a formated email with formular input (independend of number of fields) # 25.08.03 (spr) use strict; use CGI::Carp qw(fatalsToBrowser); # Input and formate read(STDIN, my $Daten, $ENV{'CONTENT_LENGTH'}); my @Formularfelder = split(/&/, $Daten); my ($Feld, $Name, $Wert); my %Formular; foreach $Feld (@Formularfelder) { (my $Name, my $Wert) = split(/=/, $Feld); $Wert =~ tr/+/ /; $Wert =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; $Wert =~ s//>/g; $Formular{$Name} = $Wert; } # Output # HTML-output my $test = 0; if( $test != 0) { # for testing print "Content-type: text/html\n\n"; print '', "\n"; print "