So what's your metric for "shortest"?
String length doesn't equal compression.
use v5.12; use warnings; use Data::Dump; use Test::More; test ( [ <{b,{c,d}e}> ], [ <{b,ce,de}> ], ); test ( [ <{c,d}e> ], [ <{ce,de}> ], ); sub test { my @g = @_; for my $i (0..$#g) { for my $j ($i+1..$#g) { is_deeply($g[$i],$g[$j],"$i,$j"); } } ddx @g; } done_testing;
ok 1 - 0,1 # challenge_choroba_globs.pl:26: (["b", "ce", "de"], ["b", "ce", "de"] +) ok 2 - 0,1 # challenge_choroba_globs.pl:26: (["ce", "de"], ["ce", "de"]) 1..2
Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery
In reply to Re: Challenge: Generate a glob patterns from a word list
by LanX
in thread Challenge: Generate a glob patterns from a word list
by choroba
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |