<div class="gmail_quote">On Thu, Apr 9, 2009 at 8:52 PM,  <span dir="ltr">&lt;<a href="mailto:seasprocket@gmail.com">seasprocket@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
map evaluates BLOCK in LIST context</blockquote><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">But that&#39;s ugly -- is there a cleaner way to avoid this problem?<font color="#888888"><br>

</font></blockquote></div><br>
... map { scalar( ... ) } ...<br><br>There are also lots of other ways to get scalar context.  Speaking of bugs, I consider the fact that the following doesn&#39;t fix the problem (at least not in all versions of Perl) to be a Perl bug :)<br>
<br>... map { ( ... )[0] } ...<br><br>Tye<br>