<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Wasn't aware of this except in the "given/when" example shown. &nbsp;Very nice!<div><br></div><div>Also, I thought given/when is in Perl 6 only? Did I miss something? &nbsp;Admittedly I haven't had as much time to mess with hacking Perl lately!</div><div><br></div><div>Best Regards,</div><div>Travis</div><div><br><div><div>On Apr 1, 2010, at 1:52 PM, Theodore Katseres wrote:<div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">2010/4/1 Jay Hannah <span dir="ltr">&lt;<a href="mailto:jay@jays.net">jay@jays.net</a>&gt;</span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Wow. smartmatch.<br>
<br>
use 5.10.0;<br>
if ($a ~~ $b) {<br>
<br>
<a href="http://perldoc.perl.org/perlsyn.html#Smart-matching-in-detail" target="_blank">http://perldoc.perl.org/perlsyn.html#Smart-matching-in-detail</a><br>
<br>
Anyone use this beast?<br></blockquote><div><br>I use implicit smart matching with the&nbsp; when statement the most.<br><br>eg.<br><br>given ( $a ) { <br>&nbsp;&nbsp;&nbsp; when ( $b ) { dosomething(); }<br>&nbsp;&nbsp;&nbsp; default { dosomethingelse(); }<br>
}<br><br></div></div>-- <br>Ted Katseres<br> &nbsp; &nbsp; &nbsp;||=O=||<br>
_______________________________________________<br>Omaha-pm mailing list<br><a href="mailto:Omaha-pm@pm.org">Omaha-pm@pm.org</a><br>http://mail.pm.org/mailman/listinfo/omaha-pm</blockquote></div><br><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Travis McArthur</div></div></span></div></span></div></span></span></div></div></div></div></body></html>