- # first check if the whole thing succeeds
- @out = get($call);
- return @out if @out > 0 && $out[0] eq $call;
-
- # now split the call into parts if required
- @parts = ($call =~ '/') ? split('/', $call) : ($call);
-
- # remove any /0-9 /P /A /M /MM /AM suffixes etc
- if (@parts > 1) {
- $p = $parts[0];
- shift @parts if $p =~ /^(WEB|NET)$/o;
- $p = $parts[$#parts];
- pop @parts if $p =~ /^(\d+|[JPABM]|AM|MM|BCN|JOTA|SIX|WEB|NET|Q\w+)$/o;
- $p = $parts[$#parts];
- pop @parts if $p =~ /^(\d+|[JPABM]|AM|MM|BCN|JOTA|SIX|WEB|NET|Q\w+)$/o;
+ foreach $call (split /,/, $calls) {
+ # first check if the whole thing succeeds
+ my @nout = get($call);
+ push @out, @nout if @nout;
+ next if @nout > 0 && $nout[0] eq $call;
+
+ # now split the call into parts if required
+ @parts = ($call =~ '/') ? split('/', $call) : ($call);
+
+ # remove any /0-9 /P /A /M /MM /AM suffixes etc
+ if (@parts > 1) {
+ $p = $parts[0];
+ shift @parts if $p =~ /^(WEB|NET)$/o;
+ $p = $parts[$#parts];
+ pop @parts if $p =~ /^(\d+|[JPABM]|AM|MM|BCN|JOTA|SIX|WEB|NET|Q\w+)$/o;
+ $p = $parts[$#parts];
+ pop @parts if $p =~ /^(\d+|[JPABM]|AM|MM|BCN|JOTA|SIX|WEB|NET|Q\w+)$/o;
+
+ # can we resolve them by direct lookup
+ foreach $p (@parts) {
+ @nout = get($p);
+ push @out, @nout if @nout;
+ next if @nout > 0 && $nout[0] eq $call;
+ }
+ }