in reply to Re: test version of ssh from windows
in thread test version of ssh from windows

Hello

it works but the messages are too long.

I do not know if I can change the text of the variable $!?

.

This script will be integrated into nagios later with nsclient and nrpe so the messages have be short.

Replies are listed 'Best First'.
Re^3: test version of ssh from windows
by stevieb (Canon) on Aug 11, 2015 at 15:34 UTC

    In my reply above using eval, you can trap and then reword the errors as you see fit. Here's a short example.

    eval { open my $fh, '<', 'asdf' or die $!; }; if ($@ =~ /No such file or directory/){ print "short error msg\n"; # or... die "short msg"; }