Welcome to HBH! If you had an account on hellboundhacker.org you will need to reset your password using the Lost Password system before you will be able to login.

Help Wanted, New to perl


ghost's Avatar
0 0

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?


spyware's Avatar
Banned
0 0

It's not a problem with Perl, it's a logic puzzle. Learn to logic.


ghost's Avatar
0 0

One approach to do this: 1- n digits means n nested loops. 2- array of letters. 3- modulus to make things go "circular"


ghost's Avatar
0 0

I think this is the easiest way to do it:


while() {
	print $string, "\n";
	$string++;
}
exit;

btw, I don't think this will work in any other language.


ghost's Avatar
0 0

Sweni wrote: I think this is the easiest way to do it:


while() {
	print $string, "\n";
	$string++;
}
exit;

btw, I don't think this will work in any other language.

This won't rotate dude.


ghost's Avatar
0 0

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 :P


ghost's Avatar
0 0

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).


ghost's Avatar
0 0

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 :p But he did just ask how to "print it on the screen" ;)


ghost's Avatar
0 0

Yeah. True. But I wonder why he just want them printed on the screen. :right: