in reply to Re: Concatenating strings with tabs between and returning the result
in thread Concatenating strings with tabs between and returning the result

You can't use naked blocks like that in a ternary operator. You also appear to be using map in void context as a loop to catenate elements to $_. Unfortunately you seem to misunderstand that map returns a list and also that the $_ you are assigning to is aliased to each element of the array in turn, so you are not catenating to the $_ you previously had. Not surprisingly you make no attempt to concatenate the list of elements map returns.

I tried to reconstruct what you probably meant, but the $_.=$_; return $_ part doesn't make any sense at all, so I don't have any idea what you were thinking.

Please make at least a token effort to verify your code next time.

Makeshifts last the longest.

  • Comment on Re^2: Concatenating strings with tabs between and returning the result