note
bart
I think [McA] pretty much got it nailed. Let me tell you what is going on.
<ol><li><c>@clk_array = %clock_sheet;</c> will flatten the hash as a list in the form (key1, value1, key2, value2, ...). You <em>either</em> want just the keys, <em>or</em> just the values. For which, duh, [doc://keys] and [doc://values] could be very useful. Like:
<c>
@clk_array = keys %clock_sheet;
</c>
or
<c>
@clk_array = values %clock_sheet;
</c>
<li>You magically expect <c>"@clk_array\-name"</c> to distribute the suffix "-name" across each element. But instead the string will take each value from the array, and join them with the current value of [doc://perlvar|$"] which is a space by default, and then append the suffix to the whole.
<p>To distribute the suffix over every element, you can use [doc://map]:
<c>
@clk_with_suffix = map "$_-name", @clk_array;
</c>
</ol>
997975
997984