in reply to Re: flip-flop flop
in thread flip-flop flop

Because  firstidx returns -1 if the test block never evaluates true, a test is needed avoid returning all elements if the looked-for element is not found:
    my $from = firstidx {$_ eq $look_for} @array;
    return unless $from > -1;
    return @array[$from+1..$#array];