- or download this
A2
AB
A45
- or download this
@parts=split(/(A.+?)(?=A|$)/,"A2ABA45");
$i=1;
map {print $i++ . " -> $_\n"} @parts;
- or download this
1 ->
2 -> A2
...
4 -> AB
5 ->
6 -> A45
- or download this
@parts=grep{$_}split(/(A.+?)(?=A|$)/,"A2ABA45");
$i=1;
map {print $i++ . " -> $_\n"} @parts;
- or download this
1 -> A2
2 -> AB
3 -> A45