note
QM
That works for files in the default case, because every line will have a newline or somesuch, and will not be an empty string. For counting, <code>map</code> would be more appropriate than <code>grep</code>. But [tobyink] showed the idiom [id://1001550|above]:
<code>
my $lines =()= <$file>;
</code>
<div class="pmsig"><div class="pmsig-294463">
<p>-QM<br />
--<br />
Quantum Mechanics: The dreams stuff is made of
</div></div>
1001549
1001614