in reply to Re^3: s///g within m//g regions
in thread s///g within m//g regions

Thanks for all the variants, I've learned some things I've missed before and re-learned some things I've forgotten (this seems to happen every time I don't use perl for a couple of months or so).

The problem I see with SSCCE (despite its benefits) is that it encourages "particularization" instead of generalization; so after getting example-tailored responses, one has to play whack-a-mole with them to get to the original, abstract problem / "programming malaise".

Then again, those example-tailored responses always teach new bits of ingenuity. Anyway, thanks again.

Replies are listed 'Best First'.
Re^5: s///g within m//g regions
by hippo (Archbishop) on Nov 11, 2021 at 16:00 UTC
    The problem I see with SSCCE (despite its benefits) is that it encourages "particularization" instead of generalization ...

    See How to ask better questions using Test::More and sample data. Is incumbent upon the question asker to provide a suitable coverage of test cases to meet their requirements.


    🦛

Re^5: s///g within m//g regions
by LanX (Saint) on Nov 11, 2021 at 17:05 UTC
    > encourages "particularization" instead of generalization;

    I like generalizations too.

    I think the variations I showed are as general as possible and cover all use cases I could imagine.

    Otherwise please provide an SSCCE ... ;-p

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery