>> $counter2 = 0; >What's that for? (never used)
Hmm yeah sorry that was supposed to be $counter = 0; >Use push() to avoid holding the current array index. What do you mean by "holding the index"? >my @array1=(' ', 'a', '', 'b', "\0", 'c', undef, 'd', ' ', 'e'); my @new=grep {$_ and !/^\s+$/ and >!/^\0+$/} @array1; print join "\n", @new; Yes, that worked. Thanks very much. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>