diff options
author | Matthew Lemon <chaffinach+git@protonmail.ch> | 2022-04-23 15:34:19 +0100 |
---|---|---|
committer | Matthew Lemon <chaffinach+git@protonmail.ch> | 2022-04-23 15:34:19 +0100 |
commit | 63c210a13dae90d5af60248b9de8393b16eb3622 (patch) | |
tree | ec4c5894d6ce3f19fe041be2d0bae2b0f3992366 | |
parent | b3e9242232dd19fcd4e1fbb3ea6ecdce883d06fd (diff) |
refined
-rw-r--r-- | task_capture_completed.pl | 18 |
1 files 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`] + ) } } } |