<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>
<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 class="im"><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 class="im"><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 class="im"><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 class="im"><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 class="HOEnZb"><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>