Your skill will accomplish what the force of many cannot |
|
PerlMonks |
Re: Is it safe to use join on a hash?by choroba (Cardinal) |
on Sep 06, 2020 at 22:53 UTC ( [id://11121424]=note: print w/replies, xml ) | Need Help?? |
Using join on a hash would be kind of strange, but using it on the keys of a hash is quite common. Join has no side effects (it stringifies the elements, which might change the internal representation of the values if they are numbers, but from Perl perspective, they don't change; moreover, hash keys are always strings, anyway). To give predictable output, you might want to sort the keys before joining them:
Update: See davido's post.
map{substr$_->[0],$_->[1]||0,1}[\*||{},3],[[]],[ref qr-1,-,-1],[{}],[sub{}^*ARGV,3]
In Section
Seekers of Perl Wisdom
|
|