The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Win32::Netsh::Utils - Module contains utility functions used by various Win32::Netsh modules

VERSION

Version 0.01

SYNOPSIS

  use Win32::Netsh::Utils;
  

FUNCTIONS

str_trim($string)

Description

Trim leading and trailing whitespace from the given string

Parameters
$string

String to trim

Return

SCALAR - Trimmed string

initialize_hash_from_lookup($lookup)

Description

Return a hash reference with keys associated with the lookup defined as empty strings

Parameters
$lookup

HASH reference whose values will be used as keys for the returned hash reference

Return

HASH reference whose keys are the values of the provided lookup

get_key_from_lookup($text, $lookup)

Description

Use the provided lookup to determine the key associated with the provided text.

Parameters
$text

String to match

$lookup

Hash reference whose keys will be used to match the provided text

Return

SCALAR - Empty string if no match, or the value associated with the text

parse_ip_address($string)

Description

Parse the given string to determine if a valid IP address in dotted quad notation (i.e. 10.0.0.10)

Parameters
$string

Value to parse

Return

SCALAR - Valid IP in dotted quad notation or an empty string

AUTHOR

Paul Durden <alabamapaul AT gmail.com>

COPYRIGHT & LICENSE

Copyright (C) 2015 by Paul Durden.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.