Graham Barr <[EMAIL PROTECTED]> writes:
> On Fri, Aug 11, 2000 at 02:52:32AM -0700, Nathan Wiger wrote:
> > Mike-
> >
> > Jeremy's got a great explanation of this, which I'll paraphrase, but the
> > discussion went through lots of iterations. Think of the ^ as a carat or
> > thumbtack, holding the place for later variables. Then, consider the
> > parallels:
> >
> > Placeholder Variable
> > Anonymous ^_ $_
> > Numbered ^1 ^2 $1 $2
> > Named ^bob ^jim $bob $jim
> >
> > When you look at the symmetry this way, I think it makes a ton of sense
> > and even makes currying a lot more understandable. In fact, I think the
> > syntax is very Perlish.
>
> I agree, however I wonder if ^ is the right character. Consider a
> currie function that used a regexp
>
> /^_/
>
> What is that matching ?
We've done this. It's matching a string that begins with '_'. Which is
why, if you want to disambiguate you do /^{_}/ just like you do with
variables.
> So I would suggest something like one of : _
Not sure about :, but how you do distinguish between _foo =>
placeholder and _foo => &_foo?
--
Piers
'063039183598121887134041122600:1917131105:Jaercunrlkso tPh.'=~/^(.{6})*
(.{6})[^:]*:(..)*(..).*:(??{'.{'.$2%$4.'}'})(.)(??{print$5})/x;print"\n"