- or download this
$ perl -le ' "abcd" =~ /.{2,}(?{print $&})(*FAIL)/ '
abcd
abc
...
ef
fg
$
- or download this
$board =~ /(?<!\w).{2,}(?!\w)(?{ push @pat, [ $-[0], $& ] })(*FAIL
+)/;
#dd @pat;
...
say "patterns----------------";
dd @pat;
- or download this
default is 71 d.
old is d.
highs is 10
...
....s..... 0000100000
/home/bob/4.scripts/distro/games/29-11-2019-16-37-01.txtmove is 2
end of move, continue?
- or download this
$ ./1.perlvar.pl
10
15
This is a Hello World program
World
$
- or download this
#!/usr/bin/perl
use 5.016;
...
say $str;
say $+; # This returns the last bracket result
- or download this
my $newmask = ( $old ^ $word ) =~ tr/\0/\xff/cr;
$flip and ( $board, $heights ) = flip $board, $heights;
substr $board, $pos, length $word, $word;
...
my $tiles = join '', @tiles;
say "word is $word";
$tiles =~ s/$_// for split //, $word & $newmask;
- or download this
sub matchrule {
my ( $old, $highs, $word ) = @_;
$old eq $word and return 0;
...
$tiles =~ s/$_// or return 0 for ( $newmask & $word ) =~ /\w/g;
return 1;
}
- or download this
#my $return2=$save_file->append_utf8(@players);
#say "return2 is $return2";
...
#my $return2=$save_file->append_utf8({@players});
#say "return2 is $return2";
- or download this
@ARGV or @ARGV = qw( one two three four ); # for testing
# ...
...
tiles => [ sort splice @drawpile, 0, $maxtiles ]
};
}
- or download this
# initiate time
my $start = [gettimeofday];
#print qq|$time{'yyyymmdd hh:mm:ss.mmm', $start}\n|;
#$save_file->append_utf8("$time{'yyyymmdd hh:mm:ss.mmm', $start}\n");
- or download this
...
Duration of move 4 is 27.942196
...
patterns----------------
Duration of move 5 is 31.07824
Current player is 1