B
bernd
#!/usr/bin/perl -w
#
# hy group
#
# i feel really stupid. could it be that hard?
#
# i try to write a script to bruteforce the ASCII range. something
# like:
#
# a..z
# aa..zz
# aaa..zzz
# ...
#
# but there must be a smarter, solution than writing the same stuff
# over and over again. i'd tried some recursive stuff but failed.
#
# any help really appreciated!
#
# greez bernd (who just didn't see the solution)
use strict;
# one character
foreach my $a ('a'..'z','0'..'9') {
print "$a\n";
}
# two character
foreach my $a ('a'..'z','0'..'9') {
foreach my $b ('a'..'z','0'..'9') {
print "$a$b\n";
}
}
# tree character
foreach my $a ('a'..'z','0'..'9') {
foreach my $b ('a'..'z','0'..'9') {
foreach my $c ('a'..'z','0'..'9') {
print "$a$b$c\n";
}
}
}
# n character ???
#
# hy group
#
# i feel really stupid. could it be that hard?
#
# i try to write a script to bruteforce the ASCII range. something
# like:
#
# a..z
# aa..zz
# aaa..zzz
# ...
#
# but there must be a smarter, solution than writing the same stuff
# over and over again. i'd tried some recursive stuff but failed.
#
# any help really appreciated!
#
# greez bernd (who just didn't see the solution)
use strict;
# one character
foreach my $a ('a'..'z','0'..'9') {
print "$a\n";
}
# two character
foreach my $a ('a'..'z','0'..'9') {
foreach my $b ('a'..'z','0'..'9') {
print "$a$b\n";
}
}
# tree character
foreach my $a ('a'..'z','0'..'9') {
foreach my $b ('a'..'z','0'..'9') {
foreach my $c ('a'..'z','0'..'9') {
print "$a$b$c\n";
}
}
}
# n character ???