just to reiterate on damn cool features ...<br><br>#!/opt/perlbleed/bin/perl<br><br>use strict;<br>use warnings;<br><br>use feature &quot;:5.10&quot;;<br><br>my $isuniq = \&amp;isuniq;<br><br>while(&lt;&gt;)<br>{<br>&nbsp;&nbsp;&nbsp; given ($_)
<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; when ( /^(\S.*)$/ ) { say &quot;you said $1 &quot;,$isuniq-&gt;($1),&quot; times&quot; }<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; default { say &quot;you said nothing &quot;,$isuniq-&gt;(qq{nothing}),&quot; times&quot; }<br>&nbsp;&nbsp;&nbsp; }<br>
}<br><br>sub isuniq<br>{<br>&nbsp;&nbsp;&nbsp; state %count;<br>&nbsp;&nbsp;&nbsp; return ++$count{$_}{&#39;count&#39;};<br>}<br clear="all"><br><br>-- <br>The optimist thinks that this is the best of all possible worlds,<br>and the pessimist knows it.
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-- J. Robert Oppenheimer, &quot;Bulletin of Atomic Scientists&quot;