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}
|