From: Stephen L Johnson Date: Tue, 22 Jan 2002 15:08:07 +0000 (+0000) Subject: fixed problem of $_ not being assigned in while( shift... loop X-Git-Tag: spong-2_7_7~18 X-Git-Url: http://git.etc.gen.nz/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b10664ca136052b06f118148be967c81087e0e3;p=spong.git fixed problem of $_ not being assigned in while( shift... loop --- 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; }