From: Mark Wooding Date: Fri, 2 Jul 2021 17:00:36 +0000 (+0100) Subject: disorder-notify.in, disorder-ondemand.in: Make sure `$buffer' is defined. X-Git-Url: https://git.distorted.org.uk/~mdw/disorder-toys/commitdiff_plain/c637731359e7f8412cdda193d672fceed1b3e0a2 disorder-notify.in, disorder-ondemand.in: Make sure `$buffer' is defined. --- diff --git a/disorder-notify.in b/disorder-notify.in index ffdfb8e..2da54f6 100755 --- a/disorder-notify.in +++ b/disorder-notify.in @@ -260,7 +260,7 @@ sub watch_and_notify0 ($) { } @lines = split /\n/, $buffer, -1; - $buffer = pop @lines; + $buffer = pop(@lines) // ""; } } diff --git a/disorder-ondemand.in b/disorder-ondemand.in index d9429bb..a517e7b 100755 --- a/disorder-ondemand.in +++ b/disorder-ondemand.in @@ -130,7 +130,7 @@ sub watch_status () { } @lines = split /\n/, $buffer, -1; - $buffer = pop @lines; + $buffer = pop(@lines) // ""; } for my $line (@lines) {