$ perl -E 'say substr $_, 1 + rindex $_, "_" for qw{He_is_super_hero_Spiderman He_was_a_super_actor_Tom}' Spiderman Tom