in reply to BRUTEFORCE problem and a ?bug?

Use <code> tags around your code, and take a look to the Writeup Formatting Tips.

If you have to generate a sequence of letters, this will do:

my @alphabeth = 'a' .. 'z';

You never initialise $slovo, but you keep using it, expecially in the while test. Moreover, are you sure that you get an ERROR and not a WARNING?

If you want to increment a letter, it's as easy as doing this:

my $letter = 'p'; $letter++; # Now $letter is 'q'

Note that you should chomp immediately when you get the input letter, something along the lines:

chomp(my $hladane = <STDIN>);
This also means that you don't need to chomp() in the while loop.

Regarding the newline problem, note that you never chomp() the $lf variable, that's where you get your newline from.

Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf

Don't fool yourself.

Replies are listed 'Best First'.
Re^2: BRUTEFORCE problem and a ?bug?
by xoddam (Novice) on Mar 19, 2007 at 17:03 UTC
    Ok got it now, thank you all ... And sorry for the tags ... Next time Ill use them ... GJ all ty
      No need for a "next time", you can go and edit your post to add the code tags as suggested by many. It would be nice if you did because the page is quite large.

      Flavio
      perl -ple'$_=reverse' <<<ti.xittelop@oivalf

      Don't fool yourself.