Are you looking for something like:
%hash = (%hash, split /X/ 'fooXbar');
I don't think that's particularly efficient tho' as it rewrites the entire hash every time. I'd probably use your second solution and split to an intermediate array.
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
In reply to Re: Assign (key, value) to a hash w/o clobbering hash
by davorg
in thread Assign (key, value) to a hash w/o clobbering hash
by Melly
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |