in reply to Exception handling

In your loop, skip that term.

for (my $term = $terms; $term <=40; $term++) { next if $term == 18; $rh->cmd("request system logout terminal pts/$term"); }

Replies are listed 'Best First'.
Re^2: Exception handling (skip one item in list)
by Anonymous Monk on Oct 20, 2017 at 08:28 UTC

    Thanks. But, line number is random. Can't predict the same line again

      Look for the docs of your JT class (whatever that is) and see how to determine your specific term from it or from the array elements it returns (your $rh).