#!/usr/bin/perl -w #Markus Westphal 16.06.2005 use strict; my($test,@ar,@abc,$i,$anz); open(FH,"<./wcnt.txt") || die ("Die Datei wcnt.txt kann nicht geoeffnet werden!\n"); @ar=; close (FH); @abc=("A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"); print "Anfangsbuchstaben\n"; for(@abc) { for($i=0,$anz=0; $i<=$#ar; $i++) { $test=$ar[$i]; $test=~ s/[" "]| //g; $test= uc($test); $test=substr($test,0,1); if($_ eq $test) {$anz++;} } print "$_ = $anz\n"; }