On 4/18/06, Gallagher, Tim (NE) <[EMAIL PROTECTED]> wrote: > if(length($arry[$x]) < 0)
Are you sure you want length() there? > delete($arry[$x]); I'm not sure you want delete() there; you may want splice(). > Here is the problem, I want to delete the 0's from the array and > know what index number that was. It looks as if it's $x in your example code. Can you save the value of $x (for example, by pushing it onto an array), or is that not the problem? Another way to do what I think you're trying to do would be to use grep() to identify the indices of the zeroes, then you can delete them all at once. If delete() does what you want, maybe something like this? my @zeroes = grep $arry[$_] == 0, 0..$#arry; delete @[EMAIL PROTECTED] Hope this helps! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>