Re: Delete elements from an array

2006-04-18 Thread Tom Phoenix
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 nu

Delete elements from an array

2006-04-18 Thread Gallagher, Tim \(NE\)
I want to delete elements from an array and get what number that is. Here is an example/ [code] use strict; use warnings; my @arry = (1,2,3,4,0,9,8,0,8,6,5,0,9,0,8,0,0,0,7,6,5,4,3,5,76,0,7,0,2,0,7,54,43,0); my $x = 0; while($x < scalar(@arry)) { if(length($arry[$x])