From 63c210a13dae90d5af60248b9de8393b16eb3622 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sat, 23 Apr 2022 15:34:19 +0100 Subject: refined --- task_capture_completed.pl | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/task_capture_completed.pl b/task_capture_completed.pl index f178dca..a478ba1 100644 --- a/task_capture_completed.pl +++ b/task_capture_completed.pl @@ -7,24 +7,22 @@ use feature qw(say); my $project = $ARGV[0]; -my $stuff = `task status:completed project:$project all`; - -my @x = split(/\n/, $stuff); +my @tw_output = qx/task status:completed project:$project all/; # print "$_\n" foreach @x; my %tasks; -my @taskids; my $id; -foreach my $line (@x) { + +foreach my $line (@tw_output) { my @data = split / /, $line; if (defined($data[4])) { - if ($data[4] =~ /\S{8}/) { - $tasks{$data[4]} = ( - [`task _get $data[4].description`, - `task _get $data[4].end`] - ) + if ($data[4] =~ /\S{8}/) { + $tasks{$data[4]} = ( + [`task _get $data[4].description`, + `task _get $data[4].end`] + ) } } } -- cgit v1.2.3