while(){ $check=0; chomp ($_); $first_char=ord(substr($_,0,1)); if ((length($_)!=78) && (!($_=~/^\s*$/)) && ($first_char!=26) ) { $check=1; } }