in reply to Re: can u suggest a regex for this ?
in thread can u suggest a regex for this ?

THAT is very ELEGANT and Perlish TYVM!

I get an error with the "r" modifier but it seems to work without it? I'm on Perl 5.8.8 maybe /r isn't supported?

Replies are listed 'Best First'.
Re^3: can u suggest a regex for this ?
by jo37 (Curate) on Feb 03, 2023 at 15:43 UTC

    Without /r, map would modify the original array, but this is not available in very old versions.

    Greetings,
    -jo

    $gryYup$d0ylprbpriprrYpkJl2xyl~rzg??P~5lp2hyl0p$
Re^3: can u suggest a regex for this ?
by kcott (Archbishop) on Feb 03, 2023 at 17:04 UTC
Re^3: can u suggest a regex for this ?
by hippo (Archbishop) on Feb 03, 2023 at 15:54 UTC
    I'm on Perl 5.8.8

    There have been recent discussions here about using old Perls. If it's not too impertinent to ask, would you mind divulging which O/S (and which version) you are running which has this Perl version installed? I'm unaware of any O/S still supported which has it. TYVM.


    🦛

      I thought I'd replied to this but I don't see it. Sadly we're on RH5.5 . Our company is VERY change-averse. Like NASA using Apollo components..

        Thanks for replying and for your honesty. And while I do understand and sympathise with the change-averse mindset there comes a point beyond which not changing becomes more risky than changing. Good luck with persuading TPTB of this.

        Update: added abbr title to TPTB, given the ensuing discussion. Should have done it in the first place. Mea culpa.


        🦛

        RHEL5 went EOL just shy of 6 years ago, and extended support ended three years ago. You must not have any sort of public / outside audit looking into things because that's crufty enough that it would more than likely be called out in such.

        The cake is a lie.
        The cake is a lie.
        The cake is a lie.

        I work in a very change/risk averse industry, however an unsupported OS is a huge red flag for us.