summaryrefslogtreecommitdiffstats
path: root/Aufgabe1/ProduktName.pl
diff options
context:
space:
mode:
Diffstat (limited to 'Aufgabe1/ProduktName.pl')
-rw-r--r--Aufgabe1/ProduktName.pl74
1 files changed, 74 insertions, 0 deletions
diff --git a/Aufgabe1/ProduktName.pl b/Aufgabe1/ProduktName.pl
new file mode 100644
index 0000000..3e39ea8
--- /dev/null
+++ b/Aufgabe1/ProduktName.pl
@@ -0,0 +1,74 @@
+#!/usr/bin/env perl
+#===============================================================================
+#
+# FILE: ProduktName.pl
+#
+# USAGE: ./ProduktName.pl
+#
+# DESCRIPTION: Erstllt ein List von kombinasionen aus verschieden Buchstaben
+# (Aufgabe1.2)
+#
+# OPTIONS: ---
+# REQUIREMENTS: ---
+# BUGS: ---
+# NOTES: ---
+# AUTHOR: Martin Talarczyk, talarczyk.martin@fh-swf.de
+# ORGANIZATION: FH Südwestfalen, Iserlohn
+# VERSION: 1.0
+# CREATED: 07.10.2015 12:47:08
+# REVISION: ---
+#===============================================================================
+
+use strict;
+use warnings;
+use utf8;
+
+
+binmode (STDIN, ":encoding(UTF-8)");
+binmode (STDOUT, ":encoding(UTF-8)");
+binmode (STDERR, ":encoding(UTF-8)");
+use open ":encoding(UTF-8)";
+
+printf "=== 1.2.1 ===\n\n";
+
+my @buchstaben1 = ('b', 'm', 'n');
+my @buchstaben2 = ('a', 'e', 'i', 'o', 'u');
+my @buchstaben3 = ('b', 'c', 'd', 'x', 'y', 'z');
+
+my $count = 0;
+
+print "Buchstaben 1 : ";
+
+foreach my $i (@buchstaben1 ) {
+ printf $i." ";
+}
+print "\nBuchstaben 2 : ";
+
+foreach my $i (@buchstaben1 ) {
+ printf $i." ";
+}
+print "\nBuchstaben 3 : ";
+
+
+foreach my $i (@buchstaben3 ) {
+ printf $i." ";
+}
+print "\n\n";
+
+#-------------------------------------------------------------------------------
+# Ausgabe
+#-------------------------------------------------------------------------------
+foreach my $i1 (@buchstaben1)
+{
+ foreach my $i2 (@buchstaben2)
+ {
+ foreach my $i3 (@buchstaben3)
+ {
+ printf $i1 . $i2 . $i3 . " ";
+ $count++;
+ }
+ printf "\n";
+ }
+}
+
+printf "\n %s Wörter erzeugt.", $count;