Guest User

Untitled

a guest
Jul 3rd, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. sub main {
  2. my $ipmon = shift;
  3. my (@args) = @_;
  4.  
  5. my $socket;
  6. my ($rc, $output);
  7. my ($state, $msg);
  8. my %options;
  9. my ($function, $arg);
  10.  
  11. {
  12. local @ARGV = @args;
  13. my $result = GetOptions(
  14. \%options,
  15. "host|H=s",
  16. "user=s",
  17. "password=s",
  18. "Port|P=i",
  19. "warning=s",
  20. "critical=s",
  21. "debug",
  22. );
  23. # remainder is the function and argument (if any)
  24. ($function, $arg) = @ARGV;
  25. }
Add Comment
Please, Sign In to add comment