-$from = 0;
-while ($f = shift @f) { # next field
- # print "f: $f list: ", join(',', @list), "\n";
- if (!$from && !$to) {
- ($from, $to) = $f =~ /^(\d+)-(\d+)$/o; # is it a from -> to count?
- next if $from && $to > $from;
+ my $cmdline = shift;
+ my @f = split /\s+/, $cmdline;
+ my $f;
+ my @out;
+ my ($from, $to, $who, $hint);
+
+ $from = 0;
+ while ($f = shift @f) { # next field
+ # print "f: $f list: ", join(',', @list), "\n";
+ unless ($from || $to) {
+ ($from, $to) = $f =~ /^(\d+)-(\d+)$/o; # is it a from -> to count?
+ next if $from && $to > $from;
+ }
+ unless ($to) {
+ ($to) = $f =~ /^(\d+)$/ if !$to; # is it a to count?
+ next if $to;
+ }
+ unless ($f =~ /^\d+$/) {
+ $who = $f;
+ next if $who;
+ }