Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17783

How do I sanitize variables in perl to remove "-" in a name?

$
0
0

The end result is that I want to run a plugin to check all interfaces in a Cisco device without having to make a service definition for every interface. check_all_interfaces.pl by Martijn Lievaart is the closest to what I need but the interface descriptions here have "-" in the name and makes the plugin go bonkers. /var/cache/icinga/iferrors/ipaddress shows everything working great except for strings with -. I'd rather not have to rewrite this per interface if there is a quick way to sanitize perl variable input.

submitted by whatstheanswerandwhy
[link][2 comments]

Viewing all articles
Browse latest Browse all 17783

Trending Articles