Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Re: Puzzle Regex: Letter Frequency Arithmetic Sequence -- oneliner

by Discipulus (Monsignor)
on Oct 18, 2017 at 08:33 UTC ( #1201559=note: print w/replies, xml ) Need Help??

in reply to Puzzle Regex: Letter Frequency Arithmetic Sequence

ThereIsMoreThanOne.. oneliner to do this!

Me too I'd use hash instead of regexes.

The problem is that you'll end with deadheaded rococo messes or with at least with an ugly fruit salad of ananas patata papaya batata acacia pepper

perl -MList::Util="all" -lne "next unless/.../;my(%r,$c);$r{$_}++for(/ +./g);print if all{++$c==$_}sort values %r" linux.words # or minimum 10 char words only perl -MList::Util="all" -lne "next unless/.{10,}/;my(%r,$c);$r{$_}++fo +r(/./g);print if all{++$c==$_}sort values %r" linux.words


There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1201559]
[LanX]: "DH" eq "Dumb Homies "?
[shmem]: no, no previous, and python just accepts that.
[LanX]: HA ... fun! =)
[LanX]: Py2 or 3 ?
[shmem]: moment... lemme see...
[shmem]: Python 2.7.9
[shmem]: but! perl4 doesn't suck.
[LanX]: better try 3

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (10)
As of 2018-03-20 18:31 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (257 votes). Check out past polls.