<div dir="ltr">It's not just s///ee.  It's as many e's as you want / need, though of course with more e's that way lies madness...<div><br></div><div style>I remember people talking about Lenzo using 5 e's in a s///eeeee when I was at YAPC 19100, though some people when they told they story said it was only 4.  Ahh, apocrypha... :-)</div>
<div style><br></div><div style>Cheers,</div><div style> - Richard</div><div style><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Apr 19, 2013 at 12:02 PM, Dave Doyle <span dir="ltr"><<a href="mailto:dave.s.doyle@gmail.com" target="_blank">dave.s.doyle@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">didn't know about the s///ee trick though. I had done this:<div><br></div><div><div class="im"><div>
#!/usr/bin/perl</div><div><br></div><div>use strict;</div><div><br></div><div>my $match = '^-?(.+?):?$';</div><div>
my $replace = '"-$1:"';</div><div><br></div><div><br></div><div>while (my $line = <DATA>) {</div></div><div><span style="white-space:pre-wrap">       </span>$line =~ s/$match/eval $replace/e;</div><div class="im">
<div><span style="white-space:pre-wrap">  </span>print $line;</div>
<div>}</div><div><br></div><div>__DATA__</div><div>stuff</div><div>-stuff</div><div>stuff:</div><div>-stuff:</div></div></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div>--</div><a href="mailto:dave.s.doyle@gmail.com" target="_blank">dave.s.doyle@gmail.com</a></div>
<div><div class="h5">

<br><br><div class="gmail_quote">On 19 April 2013 11:59, Dave Doyle <span dir="ltr"><<a href="mailto:dave.s.doyle@gmail.com" target="_blank">dave.s.doyle@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Hah. Was just about to do the same.</div><div class="gmail_extra"><br clear="all"><div><div>--</div><a href="mailto:dave.s.doyle@gmail.com" target="_blank">dave.s.doyle@gmail.com</a></div><div><div>

<br><br><div class="gmail_quote">On 19 April 2013 11:58, Mike Stok <span dir="ltr"><<a href="mailto:mike@stok.ca" target="_blank">mike@stok.ca</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">


<div style="word-wrap:break-word">If I was feeling crazy<div><br></div><div><div><div><font face="Andale Mono">#!/usr/bin/perl</font></div><div><font face="Andale Mono">use strict;</font></div><div><font face="Andale Mono">my $match = '^-?(.+?):?$';</font></div>


</div><div><font face="Andale Mono">my $replace = '"-$1:"'; # note the quotes...</font></div><div><div><font face="Andale Mono"><br></font></div><div><font face="Andale Mono">while (my $line = <DATA>) {</font></div>


</div><div><font face="Andale Mono">    $line =~ s/$match/$replace/ee;</font></div><div><div><font face="Andale Mono">    print $line;</font></div><div><font face="Andale Mono">}</font></div><div><font face="Andale Mono">__DATA__</font></div>


<div><font face="Andale Mono">stuff</font></div><div><font face="Andale Mono">-stuff</font></div><div><font face="Andale Mono">stuff:</font></div><div><font face="Andale Mono">-stuff: </font></div><div><br></div><div><br>


</div></div><div><div><div>On 2013-04-19, at 11:16 AM, Fulko Hew <<a href="mailto:fulko.hew@gmail.com" target="_blank">fulko.hew@gmail.com</a>> wrote:</div><br><blockquote type="cite"><span style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">#!/usr/bin/perl</span><br style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


<span style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">use strict;</span><br style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


<span style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">my $match = '^-?(.+?):?$';</span><br style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


<span style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">my $replace = '-$1:';</span><br style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


<br style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


<span style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">while (my $line = <DATA>) {</span><br style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


<span style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">    $line =~ s/$match/$replace/;</span><br style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


<span style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">    print $line;</span><br style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


<span style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">}</span><br style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


<span style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">__DATA__</span><br style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


<span style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">stuff</span><br style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


<span style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">-stuff</span><br style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


<span style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">stuff:</span><br style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px">


<span style="font-family:'courier new',monospace;font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:normal;text-align:-webkit-auto;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;display:inline!important;float:none">-stuff:</span></blockquote>


</div><br></div><span><font color="#888888"><div>
<span style="border-collapse:separate;border-spacing:0px;font-size:12px"><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">-- </div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">


<br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">Mike Stok <<a href="mailto:mike@stok.ca" target="_blank">mike@stok.ca</a>></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">


<a href="http://www.stok.ca/~mike/" target="_blank">http://www.stok.ca/~mike/</a></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px"><br></div><div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px">


The "`Stok' disclaimers" apply.</div><div><br></div><div><br></div><br></span>
</div>
<br></font></span></div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
<br>_______________________________________________<br>
toronto-pm mailing list<br>
<a href="mailto:toronto-pm@pm.org">toronto-pm@pm.org</a><br>
<a href="http://mail.pm.org/mailman/listinfo/toronto-pm" target="_blank">http://mail.pm.org/mailman/listinfo/toronto-pm</a><br>
<br></blockquote></div><br></div>