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

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re^3: Hash confusion ?!
by shmem (Chancellor) on Feb 25, 2007 at 06:11 UTC
    My main question is how to fix denc() in my code ?

    An old irish joke goes "could you tell me the way to Tipperary?" - "well, I wouldn't start from here..."

    Perhaps you may want to start with removing the bogus split in sub denc:

    open (DAT, "$INfile") || die "$!\n"; my @aTd = <DAT>; close(DAT); @aTd = split(/\n/, "@aTd");

    What is this supposed to do? Here's what it does: It opens a file, reads all lines into an array. Each line has a newline appended, since there's no chomp. The array is then interpolated into a string: the array elements are joined with blanks (the default value of the $" special variable), the resulting string is split at LF chars into the same array.

    Which is a bizarre way to chop "\n" from all and prepend a blank to each element in @aTd except the first.

    <update>

    Perhaps you want this instead?

    open (DAT, "$INfile") || die "$!\n"; chomp(my @aTd = <DAT>);

    </update>

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re^3: Hash confusion ?!
by Joost (Canon) on Feb 24, 2007 at 20:59 UTC
Re^3: Hash confusion ?!
by cLive ;-) (Prior) on Feb 24, 2007 at 21:52 UTC
    Um, I would suggest thinking about how to ask a question that makes sense. Why not wait until you come down from whatever it is you're on first? ;-) Seriously, you sound like a tweaker I know...

      The key to the mystery is a correct interpretation of "hash confusion"!