in reply to check if an element exists in array
The if statement in mscharrers code would then look like:
You can just print the string stored in the hash or get at the numbers with my @numbers= split /,/,$valueif (!exists $people{$name}) { $people{$name} = $value; # store array with one value } else { $people{$name} .= ",$value"; # push 2nd,3rd,.. value on array
|
|---|