Not that fancy, but straightforward.
my $string = "stash_ST18.104.22.168_1.ROLLBACK.check.20170228-101051.435944.
my $action = '';
my @parts = split(/\./, $string); # split on dot
# slot after ROLLBACK
$action = $parts[$_+1] if $parts[$_] eq "ROLLBACK";
I'm sure this can be golfed down a bit.
"I do not feel obliged to believe that the same God who endowed us with sense, reason and intellect has intended us to forgo their use." -Galileo