- or download this
Given
$delim = = 'A -3 C -4 B';
...
key2
[A -4 B] [B -4 C] /
[A -4 B] [B -4 C] / [C -4 A] [A -4 B] # only this is correct
- or download this
Given:
$delim2 = 'A -4 B';
...
[A -4 B] #ok
[A -4 B] [B -4 C] [C -4 A] [A -4 B] #ok
[A -4 B] #not ok -- don't know how this is obtained
- or download this
#!/usr/bin/perl -l
use warnings;
...
my $arr = shift;
return map{ [split(" ",$_)] }@{$arr};
}