From 2b10664ca136052b06f118148be967c81087e0e3 Mon Sep 17 00:00:00 2001 From: Stephen L Johnson Date: Tue, 22 Jan 2002 15:08:07 +0000 Subject: [PATCH] fixed problem of $_ not being assigned in while( shift... loop --- src/lib/Spong/Client/plugins/check_mailq | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/Spong/Client/plugins/check_mailq b/src/lib/Spong/Client/plugins/check_mailq index 2876f48..b5dbf24 100755 --- a/src/lib/Spong/Client/plugins/check_mailq +++ b/src/lib/Spong/Client/plugins/check_mailq @@ -4,7 +4,7 @@ $CHECKFUNCS{'mailq'} = \&check_mailq; # Sendmail mailq check for mail servers. If checks the numeber of mail # message queue against the $MAILQWARN AND $MAILQCRIT variables -# $Id: check_mailq,v 1.4 2001/09/16 18:08:39 sljohnson Exp $ +# $Id: check_mailq,v 1.5 2002/01/22 15:08:07 sljohnson Exp $ use Spong::SafeExec qw(safe_exec); @@ -17,7 +17,7 @@ sub check_mailq { $singlq = 0; my @msg = safe_exec($MAILQ); $mqcnt = 0; - while (shift @msg) { + while ($_ = shift @msg) { if (/Mail Queue\s+\((\d+)/) { $mqcnt = $1; $singleq=1; } elsif (/Total Requests:\s+(\d+)/) { $mqcnt = $1; } elsif (/\s+(\S+)\s+\((\d+)\s+requests\)/) { $qcnt{$1} = $2; } -- 2.30.2