
Laurent_R
Veteran
/ Moderator
Jan 6, 2014, 11:56 AM
Post #3 of 3
(1513 views)
|
Re: [Tejas] How to find the index of a null value in a row
[In reply to]
|
Can't Post
|
|
Please provide more of your code. is probably not doing what you expect. Additionally: is most probably wrong: the grep function returns an array. If you evaluate in in scalar constext, you will get the number of elements that satisfied the grep condition. The code that does what you probably want to do would be something like this:
my @non_nulls = grep { $_ ne '' } split /\|/, $row; But of course, that will populate the @non_nulls array with the non null values, this will not tell you that Index 6 has a null value.
|