[Melbourne-pm] nearly there...
Craig Sanders
cas at taz.net.au
Fri Dec 21 01:03:39 PST 2007
On Fri, Dec 21, 2007 at 09:50:43AM +1100, Mathew Robertson wrote:
> >>> only if they can't read perl.
> >>>
> >> nobody can read Perl... :)
> >>
> > lots of people can. it's kind of a requirement for writing it well.
> >
> whoosh....
'whooshes' really ought to be reserved for situations where your comment
was actually funny enough to be treated as a joke. it wasn't, so the
only appropriate response was to treat it as if you were serious.
> >> except that using your http example, you can't parse url arguments
> >> (without escaping)
> >
> > 1. i wouldn't. using regexps to parse CGI args is a bad idea. that's
> > what CGI or any one of several other CGI arg parsing modules are for.
> >
> obviously - but since you brought up the example, you cant then turn
> around and point fingers...
who was pointing fingers?
anyway, pattern matching isn't always about parsing. sometimes it's just
for recognition or for simple transformation and you don't give a damn
about the 'meaning' or embedded values.
> > 2. for the sake of the argument, if i were to be writing a Q&D hack
> > to do that, i would (as i mentioned in my previous msg) use another
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > separator. '|', perhaps. or maybe '-'. or something.
i brought up that example too (twice. three times now), which you chose
to ignore.
> > 2. POD has such examples inside regexps?
> >
> perlre has examples using {} <>, perlop uses {}
still ugly, IMO. and far more prone to creating confusion than simply
using an = as the regexp separator.
one final advantage of = is that it is a single keystroke. on
reflection, that is probably my primary reason (equal with the visual
distinction) for using it.
curly braces are four: shift, {, shift, }.
over a full 's/search/replace/options;', that's 8 keystrokes versus 3.
in the end, though, i really couldn't care less whether you like curly
braces as regexp separators or not and can not fathom why it bothers you
so much that i don't.
craig
--
craig sanders <cas at taz.net.au>
BOFH excuse #357:
I'd love to help you -- it's just that the Boss won't let me near the computer.
More information about the Melbourne-pm
mailing list