On Tue, Aug 29, 2000 at 11:21:30AM -0400, Joe McMahon wrote:
> This is NOT completely thought out yet; I've been mulling it over as a 
> possible RFC. I'm not happy with this syntax as it stands - there's too 
> much possible action at a distance. I'm not seeing a nicely-parseable, 
> easily-understandable way of doing this. Would this be a possible:
> 
>    $string =~ /(\d\d)-(\d\d)-(\d\d)?&{push @list,makedate(\1,\2,\3)}/g;
> 
> Or is that just too ugly and nasty for words?

How about something like this?

        $re = qr/(\d\d)-(\d\d)-(\d\d)/g;
        $re->onmatch_callback(push @list, makedate(^0,^1,^2));
        $string =~ $re;

-Scott
-- 
Jonathan Scott Duff
[EMAIL PROTECTED]

Reply via email to