in reply to My Novice is Showing

my @desc = ("submitted by", "status", "a short concise description", "Jobfail", "finance", "Stevens"); sub populate { my (@variables) = @_; return join(", ", map { qq/"$_"/ } map { $variables[$_]||'' ? ($variables[$_], $desc[$_]) : () } (0 .. $#desc)); } populate(2, 7, 8, 536870915, 536870922, 536870926);
update: got rid of unneeded variables with a map.