[Cologne-pm] Sachen, die die Welt nicht braucht, brauchen Deine Hilfe
A. Pagaltzis
pagaltzis at gmx.de
Fri Apr 11 08:54:23 CDT 2003
* Cem Sakaryali <cem.sakaryali at easi.de> [2003-04-11 11:21]:
> my @a=(a..z,1..9);
Deine a..z sind barewords, strict beschwert sich.
'a' .. 'z' bitte.
> foreach my $a (@a) {
> foreach my $b (@b) {
> foreach my $c (@c) {
Das gefiel mir irgendwie nicht, ich hab eine einzige
Schleife daraus gemacht. Echte Iteratoren hätten's
aber doch wesentlich einfacher gemacht, als was dabei
herausgekommen ist. $Godot = "Perl 6";
# use strict;
# use warnings;
# #use Net::Nslookup;
#
# my @a = (1 .. 9, 'a' .. 'z', undef);
# my @b = (1 .. 9, '-', 'a' .. 'z', undef);
# my @c = (1 .. 9, 'a' .. 'z', undef);
#
# my ($a, $b, $c) = (0)x3;
#
# while($a < @a) {
# my $name = "$a[$a]$b[$b]$c[$c].de";
#
# print(
# "$name ",
# nslookup(host => $name, type => "A") ? "exists" : "not found",
# "\n",
# );
#
# $c++;
# $b++, $c = 0 if not defined $c[$c];
# $a++, $b = 0 if not defined $b[$b];
# }
--
Gruss,
Aristoteles
More information about the Cologne-pm
mailing list