=back
-=head1 EXAMPLES
-
- ss
-
-Will pretty much do what you want
-
- ss -I
-
-Will take a picture of a window you select.
=cut
host => undef,
identity => undef,
username => undef,
- 'sendmail-options' => '',
+ 'sendmail_options' => [''],
);
GetOptions(\%options,'identity|i=s','username|l=s','daemon|d', 'syslog|s',
- 'sendmail-options|o=s',
+ 'sendmail_options|sendmail-options|o=s@',
'help|h|?','man|m');
pod2usage() if $options{help};
push @ssh_arguments, '-i', $options{identity} if defined $options{identity};
push @ssh_arguments, '-l', $options{username} if defined $options{username};
-push @ssh_arguments, q(cat - | /usr/lib/sendmail ).$options{'sendmail-options'}.' '.join(' ',@recipients);
+push @ssh_arguments, q(cat - | /usr/lib/sendmail ).
+ join(' ',ref($options{sendmail_options})?@{$options{sendmail_options}}:($options{sendmail_options}//'')).
+ ' '.join(' ',@recipients);
qx(ping -q -c 3 $hostname 2>/dev/null);
if ($?) {
print STDERR "${0}: Failed: unable to ping $hostname\n";