spx2 has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's minimum standard of quality and will not be displayed.

Replies are listed 'Best First'.
Re: function called by regex
by suaveant (Parson) on Jun 13, 2007 at 18:55 UTC
    You can do the following...
    s/pattern/doit($1,$2,$3)/e;
    and variations. The e modifier treats the right hand as perl code, and whatever is returned is substituted.

                    - Ant
                    - Some of my best work - (1 2 3)

Re: function called by regex
by shmem (Chancellor) on Jun 13, 2007 at 20:00 UTC
    You have posted 27 notes so far, by now you should know how they should be composed.
    Please check the PerlMonks FAQ on posting and formatting, specially

    As blazar told another monk -

    • please stop friggin' putting your posts in pre tags: they're discoraged at the Monastery and certainly not useful here to present some simple text

    ... and not in <code> tags either, and <br/> should be used sparingly. Use <p> instead.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re: function called by regex
by dewey (Pilgrim) on Jun 13, 2007 at 19:32 UTC
    I'd really appreciate it if you'd take the time to format your questions appropriately (don't put code or pre tags around everything, try to spell and capitalize). I don't know if anyone else cares, but to me it means that you took the time to craft a question carefully and it makes me want to take the time to try to help you.

    If you need pointers, take a look at Writeup Formatting Tips. Thanks!
Re: function called by regex
by kyle (Abbot) on Jun 13, 2007 at 18:45 UTC

    The document you refer to describes Perl 6. What version are you trying this with?

    A reply falls below the community's threshold of quality. You may see it by logging in.