<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.6000.16544" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face="Trebuchet MS" size=2>sim, a palavra "benchmark" eu sei o que 
é... sou formado em design também.</FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" size=2>como bons "amigos", seria mais fácil 
explicar o que realmente foi perguntado e não a "palavra" em si.</FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2></FONT>&nbsp;</DIV>
<DIV><FONT face="Trebuchet MS" size=2>Então o que exatamente significam os 
valores em &lt;resultado&gt;?</FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2>Sei que é uma medição para ver as melhores 
performances.... mas não compreendi totalmente.</FONT></DIV>
<DIV><FONT face="Trebuchet MS" size=2></FONT>&nbsp;</DIV>
<DIV><SPAN 
style="FONT-FAMILY: courier new,monospace">&lt;resultado&gt;</SPAN><BR 
style="FONT-FAMILY: courier new,monospace"><SPAN 
style="FONT-FAMILY: courier new,monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
Rate array while&nbsp;&nbsp;&nbsp; tr</SPAN><BR 
style="FONT-FAMILY: courier new,monospace"><SPAN 
style="FONT-FAMILY: courier new,monospace">array 1090778/s&nbsp;&nbsp;&nbsp; 
--&nbsp; -54%&nbsp; -71% </SPAN><BR 
style="FONT-FAMILY: courier new,monospace"><SPAN 
style="FONT-FAMILY: courier new,monospace">while 2388776/s&nbsp; 
119%&nbsp;&nbsp;&nbsp; --&nbsp; -37%</SPAN><BR 
style="FONT-FAMILY: courier new,monospace"><SPAN 
style="FONT-FAMILY: courier new,monospace">tr&nbsp;&nbsp;&nbsp; 3781862/s&nbsp; 
247%&nbsp;&nbsp; 58%&nbsp;&nbsp;&nbsp; --</SPAN><BR 
style="FONT-FAMILY: courier new,monospace"><SPAN 
style="FONT-FAMILY: courier new,monospace">&lt;/resultado&gt;</SPAN></DIV>
<DIV><SPAN style="FONT-FAMILY: courier new,monospace"></SPAN>&nbsp;</DIV>
<DIV><SPAN style="FONT-FAMILY: courier new,monospace"><FONT face="Trebuchet MS" 
size=2></FONT></SPAN>&nbsp;</DIV>
<BLOCKQUOTE 
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV 
  style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
  <A title=cromo.jml@gmail.com href="mailto:cromo.jml@gmail.com">Márcio 
  Vitor</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A title=cascavel-pm@pm.org 
  href="mailto:cascavel-pm@pm.org">Cascavel Perl Mongers</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Wednesday, November 21, 2007 2:47 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Cascavel-pm] Contando 
  caractares</DIV>
  <DIV><FONT face="Trebuchet MS" size=2></FONT><BR></DIV>Poxa Fernando na boa, 
  fazer uma pesquisa não é tão mais difícil do que perguntar na lista, fiz a 
  pesquisa e a primeira ocorrência é deste link (em português):<BR><A 
  href="http://pt.wikipedia.org/wiki/Benchmark ">http://pt.wikipedia.org/wiki/Benchmark 
  </A><BR><BR>Abraços<BR><BR>Márcio Vitor<BR><BR>
  <DIV class=gmail_quote>On Nov 21, 2007 2:41 PM, &lt;<A 
  href="mailto:fernandolouis@terra.com.br">fernandolouis@terra.com.br</A>&gt; 
  wrote:<BR>
  <BLOCKQUOTE class=gmail_quote 
  style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
    <DIV bgcolor="#ffffff">
    <DIV><FONT face="Trebuchet MS" size=2>Amigo,</FONT></DIV>
    <DIV><FONT face="Trebuchet MS" size=2></FONT>&nbsp;</DIV>
    <DIV><FONT face="Trebuchet MS" size=2>não compreendi o 
    &lt;resultado&gt;&lt;/resultado&gt;</FONT></DIV>
    <DIV><FONT face="Trebuchet MS" size=2></FONT>&nbsp;</DIV>
    <DIV><FONT face="Trebuchet MS" size=2>o que exatamente siginifcam os 
    valores? E pra que serve o "Benchmark"?</FONT></DIV>
    <DIV><FONT face="Trebuchet MS" size=2></FONT>&nbsp;</DIV>
    <DIV><FONT face="Trebuchet MS" size=2>[]s,</FONT></DIV>
    <DIV><FONT face="Trebuchet MS" size=2>Fernando</FONT></DIV>
    <DIV><FONT face="Trebuchet MS" size=2></FONT>&nbsp;</DIV>
    <BLOCKQUOTE 
    style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: rgb(0,0,0) 2px solid; MARGIN-RIGHT: 0px">
      <DIV class=Ih2E3d>
      <DIV 
      style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal">----- 
      Original Message ----- </DIV>
      <DIV 
      style="BACKGROUND: rgb(228,228,228) 0% 50%; FONT: 10pt arial; font-size-adjust: none; font-stretch: normal; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial"><B>From:</B> 
      <A title=shonorio@gmail.com href="mailto:shonorio@gmail.com" 
      target=_blank>Solli Honorio</A> </DIV>
      <DIV 
      style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>To:</B> 
      <A title=cascavel-pm@pm.org href="mailto:cascavel-pm@pm.org" 
      target=_blank>Cascavel Perl Mongers</A> </DIV>
      <DIV 
      style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>Sent:</B> 
      Tuesday, November 20, 2007 6:28 PM</DIV>
      <DIV 
      style="FONT: 10pt arial; font-size-adjust: none; font-stretch: normal"><B>Subject:</B> 
      Re: [Cascavel-pm] Contando caractares</DIV>
      <DIV><BR></DIV></DIV>
      <DIV>
      <DIV></DIV>
      <DIV class=Wj3C7c><SPAN style="FONT-FAMILY: courier new,monospace">Não 
      resisti, que tal um golfe ?</SPAN><BR 
      style="FONT-FAMILY: courier new,monospace"><BR 
      style="FONT-FAMILY: courier new,monospace"><SPAN 
      style="FONT-FAMILY: courier new,monospace">$q=$v=~y/a//;</SPAN><BR 
      style="FONT-FAMILY: courier new,monospace"><BR 
      style="FONT-FAMILY: courier new,monospace"><SPAN 
      style="FONT-FAMILY: courier new,monospace">... e tem outra coisa, o 'tr' 
      ou 'y' é mais rápido ... </SPAN><BR 
      style="FONT-FAMILY: courier new,monospace"><SPAN 
      style="FONT-FAMILY: courier new,monospace">&lt;code&gt;<BR>use Benchmark 
      qw(:all) ;<BR>my $var&nbsp;&nbsp; = 'parlamentarismo';<BR><BR>cmpthese(-1, 
      {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      'array' =&gt; <A href="mailto:%27@%7B%5B$var" target=_blank>'@{[$var</A> 
      =~ /a/g]}', 
      <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      'while' =&gt; 'while ( $var =~ /a/g ) { 
      $qtd02++}',<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      'tr'&nbsp;&nbsp;&nbsp; =&gt; '$var =~ 
      y/a/A/'<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      });<BR style="FONT-FAMILY: courier new,monospace"></SPAN><SPAN 
      style="FONT-FAMILY: courier new,monospace">&lt;/code&gt;<BR><BR 
      style="FONT-FAMILY: courier new,monospace"></SPAN><SPAN 
      style="FONT-FAMILY: courier new,monospace">&lt;resultado&gt;</SPAN><BR 
      style="FONT-FAMILY: courier new,monospace"><SPAN 
      style="FONT-FAMILY: courier new,monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
      Rate array while&nbsp;&nbsp;&nbsp; tr</SPAN><BR 
      style="FONT-FAMILY: courier new,monospace"><SPAN 
      style="FONT-FAMILY: courier new,monospace">array 
      1090778/s&nbsp;&nbsp;&nbsp; --&nbsp; -54%&nbsp; -71% </SPAN><BR 
      style="FONT-FAMILY: courier new,monospace"><SPAN 
      style="FONT-FAMILY: courier new,monospace">while 2388776/s&nbsp; 
      119%&nbsp;&nbsp;&nbsp; --&nbsp; -37%</SPAN><BR 
      style="FONT-FAMILY: courier new,monospace"><SPAN 
      style="FONT-FAMILY: courier new,monospace">tr&nbsp;&nbsp;&nbsp; 
      3781862/s&nbsp; 247%&nbsp;&nbsp; 58%&nbsp;&nbsp;&nbsp; --</SPAN><BR 
      style="FONT-FAMILY: courier new,monospace"><SPAN 
      style="FONT-FAMILY: courier new,monospace">&lt;/resultado&gt;<BR><BR 
      style="FONT-FAMILY: courier new,monospace"></SPAN>
      <DIV class=gmail_quote>On Nov 20, 2007 3:15 PM, Adriano Ferreira &lt;<A 
      href="mailto:a.r.ferreira@gmail.com" 
      target=_blank>a.r.ferreira@gmail.com</A>&gt; wrote:<BR>
      <BLOCKQUOTE class=gmail_quote 
      style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
        <DIV>
        <DIV></DIV>
        <DIV>On Nov 20, 2007 9:35 AM, &nbsp;&lt;<A 
        href="mailto:fernandolouis@terra.com.br" 
        target=_blank>fernandolouis@terra.com.br</A>&gt; 
        wrote:<BR>&gt;<BR>&gt;<BR>&gt; Dae Pessoal... olha só...<BR>&gt;<BR>&gt; 
        $variavel = "casa"; <BR>&gt; Como faço pra contar quantos "a" tem em 
        $variavel?<BR>&gt; Tentei o seguinte, mas não fucionou:<BR>&gt; $qtd = 
        $variavel =~ m /a/g;<BR><BR></DIV></DIV>Se o que você quer é apenas 
        contar caracteres, use tr// <BR><BR>$qtd = $variavel =~ 
        tr/a/a/;<BR><BR>Leia sobre o operator em "perldoc perlop" e sobre este 
        uso em particular.<BR><BR>&gt;<BR>&gt; []s,<BR>&gt; Fernando<BR>
        <DIV>
        <DIV></DIV>
        <DIV>&gt; _______________________________________________ <BR>&gt; 
        Cascavel-pm mailing list<BR>&gt; <A href="mailto:Cascavel-pm@pm.org" 
        target=_blank>Cascavel-pm@pm.org</A><BR>&gt; <A 
        href="http://mail.pm.org/mailman/listinfo/cascavel-pm" 
        target=_blank>http://mail.pm.org/mailman/listinfo/cascavel-pm 
        </A><BR>&gt;<BR>_______________________________________________<BR>Cascavel-pm 
        mailing list<BR><A href="mailto:Cascavel-pm@pm.org" 
        target=_blank>Cascavel-pm@pm.org</A><BR><A 
        href="http://mail.pm.org/mailman/listinfo/cascavel-pm" 
        target=_blank>http://mail.pm.org/mailman/listinfo/cascavel-pm</A> 
        <BR></DIV></DIV></BLOCKQUOTE></DIV><BR><BR clear=all><BR>-- <BR>"o animal 
      satisfeito dorme". - Guimarães Rosa </DIV></DIV>
      <P></P>
      <HR>

      <P></P>_______________________________________________
      <DIV class=Ih2E3d><BR>Cascavel-pm mailing list<BR><A 
      href="mailto:Cascavel-pm@pm.org" 
      target=_blank>Cascavel-pm@pm.org</A><BR><A 
      href="http://mail.pm.org/mailman/listinfo/cascavel-pm" 
      target=_blank>http://mail.pm.org/mailman/listinfo/cascavel-pm</A></DIV></BLOCKQUOTE></DIV><BR>_______________________________________________<BR>Cascavel-pm 
    mailing list<BR><A 
    href="mailto:Cascavel-pm@pm.org">Cascavel-pm@pm.org</A><BR><A 
    href="http://mail.pm.org/mailman/listinfo/cascavel-pm" 
    target=_blank>http://mail.pm.org/mailman/listinfo/cascavel-pm 
  </A><BR></BLOCKQUOTE></DIV><BR>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Cascavel-pm mailing 
  list<BR>Cascavel-pm@pm.org<BR>http://mail.pm.org/mailman/listinfo/cascavel-pm</BLOCKQUOTE></BODY></HTML>