I'm trying to follow this tutorial for my own code which basically right now reads a value into a scalar which is pushed into an array called states. However, it doesnt properly hash the function like in the tutorial and I believe its because the contents of the array isn't properly quoted.
I've tried
foreach (@states)
{
q($_);
}
and
push @states, q($key);
but neither produces the necessary output. Currently my output displays as
NY, NJ, MI , NJ
when using
print join(", ", @states);
I want it to display
'NY', 'NJ', 'MI' , 'NJ'