User Tools

Site Tools


kurs:cgi
#!/usr/bin/perl

use CGI qw(:standard);

use CGI qw/:standard/;
use CGI;

$query=CGI->new();
$text=$query->param('text');

print header();

if ($text eq "")
        {
        print "<h1>Bitte gib einen Text ein!</h1>";
print <<TXT;
<form method=get action="http://mailbox.univie.ac.at/~mh/cgi-bin/oschttirol.cgi">
        <input type=submit value=Eintragen> <br>
        <textarea name=text cols=50 rows=20>
$st
        </textarea>

</form>
TXT
        }
else
{
print "<h1> Auf (Oscht)Tirolerisch: </h1> <br> <br> ";
%conv=(
"\n", "<br>",
"st", "scht",
"s[\\W\\s]", "sch "
);

foreach $key (keys %conv)
        {
         $text =~ s/$key/$conv{$key}/g;
        }

print $text;
kurs/cgi.txt · Last modified: 2014/09/10 21:22 (external edit)