| Author |
Help Wanted, New to perl |
DarkMantis
Member

Posts: 192
Location: Bringing Security To You!
Joined: 23.04.06 Rank: Elite |
|
Hi all,
I'm struggling to learn Perl, Im used to C and PHP.
I started learning perl about ... 15 mins ago. I can make a number list generator, thats really simple.
How would you make a wordlist which starts at
a
b
c
...
aa
ab
ac
You get the picture.
I just want to print it to the screen. Not save it anywhere.
Is that relatively simple to do?

THE PEOPLE UNITED WILL NEVER BE DEFEATED!
don't care for money, and money's not for me,
the money fueled this empire and our racist history.
Although I'm forced to use it, the rules have all been set.
But life is not worth living when yer soul is in debt!
MONEY KILLS.
MONEY RAPES.
MONEY LIES.
MONEY HATES. |
|
| Author |
RE: Help Wanted, New to perl |
spyware
Member

Posts: 4190
Location: The Netherlands
Joined: 14.04.07 Rank: God Warn Level: 90
|
|
It's not a problem with Perl, it's a logic puzzle. Learn to logic.

"The chowner of property." - Zeph Widespread intellectual and moral docility may be convenient for leaders in the short term,
but it is suicidal for nations in the long term. - Carl Sagan Since the grid is inescapable, what were the earlier lasers about? Does the corridor have a sense of humor? - Ebert |
|
| Author |
RE: Help Wanted, New to perl |
454447415244
Member
Posts: 156
Location:
Joined: 20.04.08 Rank: God |
|
One approach to do this:
1- n digits means n nested loops.
2- array of letters.
3- modulus to make things go "circular"
Awesome! |
|
| Author |
RE: Help Wanted, New to perl |
Sweni
Member

Posts: 36
Location: Sweden, Gothenburg
Joined: 06.06.08 Rank: God |
|
I think this is the easiest way to do it:
$string = 'a';
while() {
print $string, "\n";
$string++;
}
exit;
btw, I don't think this will work in any other language.
Edited by Sweni on 22-08-09 12:34 |
|
| Author |
RE: Help Wanted, New to perl |
454447415244
Member
Posts: 156
Location:
Joined: 20.04.08 Rank: God |
|
Sweni wrote:
I think this is the easiest way to do it:
$string = 'a';
while() {
print $string, "\n";
$string++;
}
exit;
btw, I don't think this will work in any other language.
This won't rotate dude.
Awesome! |
|
| Author |
RE: Help Wanted, New to perl |
Sweni
Member

Posts: 36
Location: Sweden, Gothenburg
Joined: 06.06.08 Rank: God |
|
I don't know what you mean by rotate x)
But after it comes to 'z' it will do 'aa' instead of '{' if that's what you mean  |
|
| Author |
RE: Help Wanted, New to perl |
454447415244
Member
Posts: 156
Location:
Joined: 20.04.08 Rank: God |
|
And what if I'm trying to do a brute-force and I want to omit some letters?! 
(Don't tell me that you'll use if condition then continue).
Awesome!
Edited by 454447415244 on 22-08-09 22:01 |
|
| Author |
RE: Help Wanted, New to perl |
Sweni
Member

Posts: 36
Location: Sweden, Gothenburg
Joined: 06.06.08 Rank: God |
|
454447415244 wrote:
And what if I'm trying to do a brute-force and I want to omit some letters?! 
(Don't tell me that you'll use if condition then continue).
Yeah then we'll have a problem But he did just ask how to "print it on the screen"  |
|
| Author |
RE: Help Wanted, New to perl |
454447415244
Member
Posts: 156
Location:
Joined: 20.04.08 Rank: God |
|
Yeah. True. But I wonder why he just want them printed on the screen. 
Awesome! |
|