in reply to Re^2: When the only tool you have is a screwdriver...
in thread When the only tool you have is a screwdriver...

Adding random test cases found a weird frankenbug. Fixing backup seems to have fixed it. Do you have any good test cases ?

#!/usr/bin/perl -l # http://perlmonks.org/?node_id=1144184 use strict; use warnings; sub e { my $p; /\Gua/gc ? return e() : /\Gu/gc || return 0; 1 while /\Gc/gc or ($p = pos(), /\Gb/gc && e() || (pos() = $p, 0)) or ($p = pos(), /\Gd/gc && e() && /\Gf/gc && e() || (pos() = $p, 0)); return 1; } for (qw( u udufu uau uu uc ubu ucbuc uaau ua uauau uccc uauuau udufuaua uaua uauau uccbucdc )) { print e() && /\G\z/gc ? "matches" : " fail", " $_"; }

Replies are listed 'Best First'.
Re^4: When the only tool you have is a screwdriver...
by Anonymous Monk on Oct 09, 2015 at 02:33 UTC

    s/frankenbug/heisenbug/