#!/usr/bin/perl -w # Auf Grundlage von mitglieder-wb.pl: 10/2001: Taal en Spraak Materiaal # converter: XYZA -> X AY AZ A und so weiter # ./MateriaalTaal.pl MateriaalTaal.html my $sp = "\ \ \ "; my $scale = "past\ niet".$sp."1".$sp."2".$sp."3".$sp."4".$sp."5".$sp."past\ goed"; my $nr = 1; open(WBLISTE,"Vragenlijst \n"; print `cat MateriaalTaalVraag.txt`; print "\n
\n"; print "\n"; print "slecht\n"; foreach () { chomp; # remove trailing CR if any tr/\011/;/; # convert TAB to ; tr/ /_/; # change space to _ s/_*\;/\;/g; # remove trailing spaces s/\;_*/\;/g; # remove leading spaces # s/\#/\é\;/g; # replace # by é $dings = $_; # maybe dings = dequote(...): quotes suck! # hmpf... how did we do strlen again??? # print STDERR size($dings) ."of $dings\n"; # if (strlen($dings) > 20) if ($dings =~ /......................./) { # only go on if line is long enough ($np1, $np2, $np3, $rc) = split(';',$dings); # now convert PP2 and PP3 to real NPs: remove the first words $np2 =~ s/^[^_]*_//g; $np3 =~ s/^[^_]*_//g; # upcase the first letters... substr($np2,0,1) =~ tr/a-z/A-Z/; substr($np3,0,1) =~ tr/a-z/A-Z/; # last, we convert _ back to space $np1 =~ tr/_/ /; $np2 =~ tr/_/ /; $np3 =~ tr/_/ /; $rc =~ tr/_/ /; $scale = "1" . "2" . "3" . "4" . "5"; # . ""; # hidded does not get assoc w/ radiobuttons, so it is useless $scale1 = $scale; $scale1 =~ s/AA/1/g; $scale2 = $scale; $scale2 =~ s/AA/2/g; $scale3 = $scale; $scale3 =~ s/AA/3/g; print " \n"; $nr = $nr + 1; } } print "
goed
$np1$rc$scale1
$np2$rc$scale2
$np3$rc$scale3

\n\n
"; print "

Bedankt voor je medewerking!

\n"; print "

Sanne, Sarah, Eric en Mirte

\n"; print "\n\n"; close(WBLISTE);