Freut mich, dass es euch gefällt.
Hier das ganze noch einmal, doch jetzt kann man es auch in einer Datei abspeichern:
Pastebin: http://pastebin.com/GhEab6KH
Ich werde eventuell morgen das ganze mit Tk verpacken, einfach um bisschen Tk zu lernen.Code:#! /usr/bin/perl use warnings; print "How many characters to use: "; chomp($how_many = <STDIN>); print "Which characters to use: "; chomp($characters = <STDIN>); print "Enter filename to save to:"; chomp($filename = <STDIN>); open $fh, '>', $filename; sub doIt { my $i; if($_[1] eq 0) { print $fh $_[0]."\n"; } else { for($i=0; $i le length($characters)-1; $i++) { doIt($_[0].substr($characters, $i, 1), $_[1]-1); } } } doIt("", $how_many); close($fh);



Zitieren
