Writing Perl script

Gert Lindström gert.lindstrom at brevik.nu
Wed Apr 2 18:54:23 CEST 2003


----- Original Message -----
From: "Jeremy Russell" <Jeremy.Russell at chickasaw.net>
To: "Lonny Selinger" <lonny at bangtherockstogether.net>; "Nagios Users"
<nagios-users at lists.sourceforge.net>
Sent: Wednesday, April 02, 2003 12:22 AM
Subject: RE: [Nagios-users] Writing Perl script


Put "use strict;" in your script and it will help you get on the right
path.  Just make sure every variable you use is declared first using "my
$var;" then you can use the variable.  The use strict will complain if
you don't do this.

http://www.perldoc.com/perl5.8.0/lib/strict.html


> Can some explain this for a perl newbi ?
>
> Explicitly initialize each varialable in use. Otherwise with caching
> enabled, the plugin will not be recompilied each time, and therefore
> Perl will not reinitialize all the variables. All old variable values
> will still be in effect.
>
> I think this is happening for me and i cant figuring out what to do
> about it.
>
> Thanks
>
> ---
> Gert





-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when
reporting any issue.
::: Messages without supporting info will risk being sent to /dev/null


-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb:
Dedicated Hosting for just $79/mo with 500 GB of bandwidth!
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue.
::: Messages without supporting info will risk being sent to /dev/null





-------------------------------------------------------
This SF.net email is sponsored by: ValueWeb: 
Dedicated Hosting for just $79/mo with 500 GB of bandwidth! 
No other company gives more support or power for your dedicated server
http://click.atdmt.com/AFF/go/sdnxxaff00300020aff/direct/01/
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list