Pattern matching with Nagios 3.x embedded perl

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
william.sweat
Posts: 3
Joined: Fri Mar 25, 2011 12:57 pm

Pattern matching with Nagios 3.x embedded perl

Post by william.sweat »

Hello,
Is there documentation that lists the differences in interpreters for embedded perl and regular perl (5.8.8)?

In one of my scripts I'm using a regex pattern match with the case-insensitive option, 'i'. This example:

Code: Select all

if ($var =~ /name/i)
Will work fine in regular perl, but it looks like the embedded nagios perl doesn't recognize the case-insensitive option, so

Code: Select all

nAmE
doesn't get assigned to

Code: Select all

$var
.

Thanks
tonyyarusso
Posts: 1128
Joined: Wed Mar 03, 2010 12:38 pm
Location: St. Paul, MN, USA
Contact:

Re: Pattern matching with Nagios 3.x embedded perl

Post by tonyyarusso »

It's not terribly comprehensive, but there is some information on http://nagios.sourceforge.net/docs/3_0/epnplugins.html.
Tony Yarusso
Technical Services
___
TIES
Web: http://ties.k12.mn.us/
Locked