in reply to Re: Memorizing The s/// Option List For Fun and Profit
in thread Memorizing The s/// Option List For Fun and Profit

I must say, I'm a bit disappointed ;) Leaving out obvious wins like "miracles" and "ideograms"?

And I realize I forgot to try more e's. Heck, I suppose technically all of them can be repeated. Trying a bit harder and a bit looser, there's magicexposure, geodesicmap, supermelodic, and my favorite so far, maliciouspleasure.

-QM
--
Quantum Mechanics: The dreams stuff is made of

  • Comment on Re^2: Memorizing The s/// Option List For Fun and Profit

Replies are listed 'Best First'.
Re^3: Memorizing The s/// Option List For Fun and Profit
by tobyink (Canon) on May 24, 2013 at 10:35 UTC

    Bear in mind that some regexp modifiers are mutually exclusive; for example /a which imposes ASCII semantics on the string being matches, and /l which imposes locale semantics on it. Thus s/foo/bar/miracles is a compile time error.

    Here's a quick script to find allowable words...

    #!/usr/bin/env perl use v5.18; open my $dict, "<", "/usr/share/dict/words"; while (<$dict>) { next unless /^[msixpodualgcer]+$/; chomp; my $ok = do { my $testing = $_; local $_; # protection eval "s/foo/bar/$testing; 1"; }; say if $ok; }

    I rather like these ones:

    • amigos
    • carcass
    • circus
    • corridor
    • crisscross
    • gigolo
    • girls
    • idiom
    • igloo
    • macrocosm
    • macroscopic
    • mammograms
    • microcosm
    • microscopic
    • orgasmic
    • pompous
    • program
    • sarcasm
    • scissors

    Now to find a way to patch B::Deparse...

    package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

      Now to find a way to patch B::Deparse..

      Patches should be submitted to perl5-porters@perl.org

      You can clone the repo with git clone perl5.git.perl.org:/perl

      ---
      $world=~s/war/peace/g