#!/usr/bin/perl %hash=(); $key = "SingleKey"; @A = ("Many","Value"); foreach $v (@A){ chomp($v); #$hash{$key}=join("|",$hash{$key},$v); $hash{$key}="$hash{$key}"."$v"; } while (($K,$V)=each(%hash)){ print"$K->$V\n"; }
In reply to Re^2: multiple values for one key in hash
by Anonymous Monk
in thread multiple values for one key in hash
by sovixi
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |