view bin/slashes @ 11918:a51467a3be09 draft

<wob_jonas> learn can\'t is the most frequent word whose pronunciation varies between /\xc9\x91\xcb\x90/ and /\xc3\xa6/ depending on dialect. A list is: advance, advantage, after, answer, ask, aunt, branch, can\'t, cast, chance, class, craft, command, contrast, dance, demand, disaster, draft, enhance, example, fast, glass, glance, grant, graph, grass, half, last, laugh, mask, maste
author HackEso <hackeso@esolangs.org>
date Thu, 29 Aug 2019 10:06:05 +0000
parents c989a1669243
children
line wrap: on
line source

#!/usr/bin/perl -w
#By Ørjan Johansen, 2009-2012.  This file is in the public domain.

$| = 1;
my $l = 0;

$_ = join '', <>;
while ($l < 512) {
        if (s!^([^/\\]+)!! or s!^\\(.)!!s) { 
                $l += length($1);
                print($1);
        }
        else {
            if (s!^/((?:[^/\\]|\\.)*)/((?:[^/\\]|\\.)*)/!!s) {
                my ($s,$d) = ($1,$2);
                $s =~ s/\\(.)/$1/gs;
                $d =~ s/\\(.)/$1/gs;
                while (s/(?:\Q$s\E)/$d/) { 
                }
            }
            else { last; }
        }
}