Hi, problem I have been having is following, I know solution is there but I cant seem to get there....
I am reading by user defined file, which looks like:
jan 2.76
feb 3.20
mar 1.6
apr 4.00
In the user file there might be empty lines which I wish to ignore, I would like to know how many lines actually have text on.......one of several versions of code attempts
$empty[0] ="";
open (VER,$f_name);
while (defined ($rows = <VER>))
{
chomp($rows);
($rows1,$rows2)=split(/\ /,$rows);
$names[$l]=$rows1;
$versions[$l]=$rows2;
if ($names[$l] != $empty[0] ) #HOW should this be done???
{
$l++;
}
}
close VER;
How to compare if the line is empty so that $l does not increase in case of empty table member....
BR Hewarn