Join us at IRC!
It is the path of least resistance that makes rivers and men crooked. - Bj Palmer
Thursday, May 24, 2012
Navigation
Members Online
Total Online: 32
Web Spiders: 17
Guests Online: 32
Members Online: 0

Registered Members: 70188
Newest Member: nuk3d
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

Help Wanted, New to perl

DarkMantis
Member



Posts: 192
Location: Bringing Security To You!
Joined: 23.04.06
Rank:
Elite
Posted on 21-08-09 11:51
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
Posted on 21-08-09 21:03
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
http://bitsofspy.net
Author

RE: Help Wanted, New to perl

454447415244
Member

Posts: 156
Location:
Joined: 20.04.08
Rank:
God
Posted on 22-08-09 00:06
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
Posted on 22-08-09 12:32
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
Posted on 22-08-09 21:40
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
Posted on 22-08-09 21:54
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
Author

RE: Help Wanted, New to perl

454447415244
Member

Posts: 156
Location:
Joined: 20.04.08
Rank:
God
Posted on 22-08-09 22:00
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
Posted on 22-08-09 22:07
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" ;)
Author

RE: Help Wanted, New to perl

454447415244
Member

Posts: 156
Location:
Joined: 20.04.08
Rank:
God
Posted on 22-08-09 22:09
Yeah. True. But I wonder why he just want them printed on the screen. :right:


Awesome!
     
Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.