Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...)

by tybalt89 (Monsignor)
on Oct 20, 2021 at 16:21 UTC ( [id://11137808]=note: print w/replies, xml ) Need Help??


in reply to Re: Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...)
in thread Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...)

Here's a way to "forget" the group...

#!/usr/bin/perl use strict; # https://perlmonks.org/?node_id=11137799 use warnings; $_='ZBBBCZZ'; my @list = split ' ', s/(.)\K(?!\1)/ /gr; use Data::Dump 'dd'; dd "given $_ got", \@list;

Outputs:

("given ZBBBCZZ got", ["Z", "BBB", "C", "ZZ"])

Replies are listed 'Best First'.
Re^3: Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...) (forget captures )
by LanX (Saint) on Oct 20, 2021 at 23:44 UTC

      And I see pKai is from Erlangen - an easy 216.6 km scenic drive from Darmstadt. :)

      Nice necropost BTW.

      Update: Maybe you should try to hire pKai to replace your new Python guy. :)

        I noticed.

        Actually our last "real" German Perl Workshop in 2020 ° was there and I'm wondering if I (ever) met him. :)

        (There was a time where I thought Erlang was named after Erlangen ...)

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

        °) the only in-house/unwired Perl Workshop of 2020 AFAIK! =)

Re^3: Yet Another Rosetta Code Problem (Perl, Ruby, Python, Haskell, ...)
by LanX (Saint) on Oct 20, 2021 at 16:28 UTC
        Oh lord .... you are right!

        All praise the /r flag! :)

        And let's hope no one will ever stumble over the semipredicate whitespace you inject for splitting ;-)

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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11137808]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (9)
As of 2024-04-23 17:51 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found