in reply to Re: Better solution to the code
in thread Better solution to the code

BTW, to put @tags into %tags use:
my %tags; @tags{@tags} = undef;
Yes, it's confusing calling a hash and and an array the same thing.