This shows you the differences between two versions of the page.
— |
kurs:plz.pl [2014/09/10 21:22] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <code> | ||
+ | use strict; | ||
+ | use warnings; | ||
+ | my $plz = $ARGV[0]; | ||
+ | |||
+ | if ($plz =~ /^A[- ]{0,1}[1-9]\d{3}$/) { | ||
+ | printf "%s ist eine PLZ\n", $plz; | ||
+ | } else { | ||
+ | printf "%s ist KEINE PLZ\n", $plz; | ||
+ | } | ||
+ | </code> |