<html><body><div style="color:#000; background-color:#fff; font-family:Courier New, courier, monaco, monospace, sans-serif;font-size:10pt"><div><span><br></span></div><div><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div class="yui_3_2_0_31_131399734580357" style="font-family: Courier New,courier,monaco,monospace,sans-serif; font-size: 10pt;"><div class="yui_3_2_0_31_131399734580359" style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Arial" size="2"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Toni <devegades@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> barcelona-pm@pm.org<br><b><span style="font-weight: bold;">Sent:</span></b> Tuesday, August 23, 2011 11:37 AM<br><b><span style="font-weight: bold;">Subject:</span></b> [bcn-pm] bug amb until<br></font><br>Hola mongers,<br><br>Mireu que em passa:<br><br>$ perl -e 'do
 { print "hola\n" } until 1'<br>hola<br>$<br><br>OK, és el que esperava.<br><br>$ perl -e 'print "hola\n" until 1'<br>$<br><br>WTF! Perquè no escriu hola?<br><br>És un bug meu o del Perl?<br><br></div></div></blockquote><div class="yui_3_2_0_31_131399734580357" style="font-family: Courier New,courier,monaco,monospace,sans-serif; font-size: 10pt;"><div style="font-family: times new roman, new york, times, serif; font-size: 12pt;">¡es una "feature"!<br><br>Esta documentado en perlsyn:<br><br>"The "while" and "until" modifiers have the usual ""while" loop" semantics (conditional evaluated first), except when applied to a "do"-BLOCK (or to the deprecated "do"-SUBROUTINE statement), in which case the block executes once before the conditional is evaluated."<br></div></div><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"></blockquote></div></div></body></html>