title: Validate | delimited txt file while reading from an array in perl
body: <p>I have a text file with delimiter as | and it has some 10 columns. I have put this file in an array and before reading i want to put check for file being valid meaning non empty and file having fixed 10 columns. If number of columns &lt; 10 then an error message should be displayed</p>