- or download this
>perl -le"'abc1def2' =~ /(?:([a-z])(?{ print $^N }))+2/"
a
...
d
e
f
- or download this
use strict;
use warnings;
...
or die("No solution\n");
print( join('-', @list), "\n" ); # abd-a-abc
- or download this
...
...
die("No solution\n") if !@list;
print("$_\n") for @list;
- or download this
abd-a-a-bc
abd-a-abc