in reply to Re^3: Hash confusion ?!
in thread Hash confusion ?!

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^5: Hash confusion ?!
by graff (Chancellor) on Feb 27, 2007 at 14:25 UTC
    why are you concerned about the working enc() instead of the broken denc()

    Is enc() working? How do you know it's working? Is it just denc() that's broken? How do you know it's broken? (Okay, I understand that the script as a whole produces the wrong output, but the problem could be anywhere.)

    Now that I know (finally) what the inputs are supposed to be, and I understand that there should be some end result that matches one of the inputs, I took the risk of trying to run it, and got a variety of warnings from the "reprocess()" function, involving use of uninitialized values in "eq" conditionals. Still, maybe that's happening because there's a problem in the "process" function that is supposed to set those values...

    If you really want to pursue this, consider using Data::Dumper so you can inspect your data structures to make sure they are being populated as you expect. You could also run with "perl -d" and put a break point at line 262 (assuming the code is exactly as originally posted), and/or at line 291 -- that's where the warnings come from.

    But I would advise against pursuing this further. Whatever it is you are trying to do here (compression? encryption? numerology?), you seem to be going about it all wrong. There should never be any need for this sort of loop structure that I see in your process() function:

    my $inC = 0; while (($inC < 304805) && (!$flag)) { if (...) { if (...) { ... my $inCc = 0; while ($inCc < 304805) { ... $inCc++; } ... } ... } $inC++ }
    IMHO, there's no point in pursuing this further. Please rethink your algorithm (or choose a better algorithm) and start over from scratch.
    A reply falls below the community's threshold of quality. You may see it by logging in.