Hello, Iím sure someone must have asked thisÖ it seems like a very basic question but I guess Iím not searching on the right words or phrases.

I have a file that has many rows in it. Each row has 75 columns. The delimiter that was used was hex 7f (ďdeleteĒ, chr(127))Ö not sure why they did that but it was before my time. Now I have to find rows that have a null value in the 72 column.

Iím loading the whole file in to an array called @data. I then iterate through the lines of the array with a foreach. But, Iím using brute force by loading 75 values in to variables using the split command and chr(127) as my delimiter. Isnít it possible for me to put the whole line in another array, @line, set the IFS to be chr(127) and then check directly for $line[72]?

This is for work so I felt uncomfortable posting the actual data. Below is a shorter version of the brute force method Iím using but itís for only four columns.

Don't slurp the entire file into an array. Instead, loop over it line-by-line. Then split the line and possibly use an array slice when doing that split so that you can extract only the desired fields.

On another note, use a lexical var for the filehandle instead of the bareword. And, use the 3 arg form of open.