my $category = first { ... } ... ; if ($category) { $category = $category->[1]; print "[INFO] Category: $category\n"; }