in reply to Re: Re: Removing blank lines from array
in thread Removing blank lines from array

Actually, his specific point was that one probably didn't want to count the number of lines read from the file, but instead the number of lines printed. Because of the presence of the next statement, they're not the same thing. Thus the use of the $cnt variable to keep track of the number of lines printed.

perl -pe '"I lo*`+$^X$\"$]!$/"=~m%(.*)%s;$_=$1;y^`+*^e v^#$&V"+@( NO CARRIER'