in reply to Array undefining istelf?

Your offending lines are here
for ($i=0;$sof_to_delete>0;$sof_to_delete--) {shift(@sof_i);
Which is shifting off all the elements in @sof_i, where $sof_to_delete was incremented in the foreach loop immediately above it for every element in @sof_i.
HTH

_________
broquaint

Replies are listed 'Best First'.
Re: Re: Array undefining istelf?
by K_M_McMahon (Hermit) on Feb 27, 2004 at 15:19 UTC
    The array appears to be undefining itself prior to it reaching this point in the script. $sof_to_delete is equal to the number of lines parsed through in the previous part of the subroutine. It is so that if I have to look past the last connection to an earlier connection, it is removed from the array prior to the next iteration of the subruotine (if it is called later.)
    -Kevin
      stop saying that :) An array is a data structure. It's a data structure. It cannot undefine itself.

      ps -- I of course am ignoring perltie because the OP is not using perltie