Hi ,
I'm getting confused as to whether I need a last, next, redo or all of the above :


foreach $file_item ( @file_items )
{
    ($file_item_code,$file_item_description) = split /,/,$file_item ;
    $count ++;

    $sth->execute($file_item_code);

    while ( @fetch = $sth->fetchrow )
      {
        $database_item_description  = $fetch[0];

         if ( $file_item_description ne $database_item_description  )
          {
            splice ( @file_items, $count, 1 );
           }

       }

}

Something will be done with each element of @file_items but only if each elements description matches the corresponding database elements description.
If there is no match then it should be removed from the array.


This is working but not for adjacent items whose descriptions don't match their database counterpart.

Is suspect I need some sort of "goto" if a splice occurs.

Mark


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to