my $combined = join ' ', grep $_, map { my $value = eval "\$$_"; $value ? sprintf("%s=%s", $_, $value) : undef } ( 'a' .. 'z' );