in reply to Assign (key, value) to a hash w/o clobbering hash
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Assign (key, value) to a hash w/o clobbering hash
by reasonablekeith (Deacon) on Sep 28, 2006 at 10:25 UTC | |
by davorg (Chancellor) on Sep 28, 2006 at 11:21 UTC | |
by reasonablekeith (Deacon) on Sep 28, 2006 at 11:47 UTC |