On May 27, 11:09 am, robertmorales...@gmail.com (Robert Morales)
wrote:
> Ok, now I added the:
>
> my $regex = "^((?!total).)*\$";
>
Using the 'qr' operator is a more efficient option
(see "Regexp Quote-Like Operators " in perlop)
and will take care of the $:
my $regex = qr/^((?!total).)*$
Robert Morales wrote:
Ok, now I added the:
my $regex = "^((?!total).)*\$";
I also removed the " " from the numbers in the if test:
if ($array[6] >= 867580){
The error msg I get this time, is like this:
r...@user# ./script.pl
0
Use of uninitialized value $array[6] in numeric ge
On Thu, May 27, 2010 at 2:09 PM, Robert Morales
wrote:
> The error msg I get this time, is like this:
>
> r...@user# ./script.pl
> 0
> Use of uninitialized value $array[6] in numeric ge (>=) at ./script.pl line
> 21, <$memory> line 3.
> Use of uninitialized value $array[6] in numeric ge (>=) at ./
Ok, now I added the:
my $regex = "^((?!total).)*\$";
I also removed the " " from the numbers in the if test:
if ($array[6] >= 867580){
The error msg I get this time, is like this:
r...@user# ./script.pl
0
Use of uninitialized value $array[6] in numeric ge (>=) at ./script.pl lin
On Thu, May 27, 2010 at 12:48 PM, Robert Morales
wrote:
> Final $ should be \$ or $name at ./script.pl line 11, within string
> syntax error at ./script.pl line 11, near "= "^((?!total).)*$""
> Execution of ./script.pl aborted due to compilation errors.
>
> It might be something with the regex, bu
Tnx Guys!
the $vgs variable is of course and error and should be $memory.
After adding your suggestions, I ran the script over again and got this
error:
r...@user# ./script.pl
Final $ should be \$ or $name at ./script.pl line 11, within string
syntax error at ./script.pl line 11, near "= "^((?!to
On 5/27/10 Thu May 27, 2010 9:27 AM, "Robert Morales"
scribbled:
> Hi,
>
> I want my code to execute the unix free command in order to analyze
> the memory state, and issue a warning if the cached memory increases.
> I don`t know what I did wrong, but this is what I got for now:
>
> #! /usr/b
On Thursday 27 May 2010 19:27:46 Robert Morales wrote:
> Hi,
>
> I want my code to execute the unix free command in order to analyze
> the memory state, and issue a warning if the cached memory increases.
> I don`t know what I did wrong, but this is what I got for now:
>
> #! /usr/bin/perl
> use
Hi,
I want my code to execute the unix free command in order to analyze
the memory state, and issue a warning if the cached memory increases.
I don`t know what I did wrong, but this is what I got for now:
#! /usr/bin/perl
use warnings;
use strict;
# return codes
$ok = 0;
$warning = 1;
$critical