in reply to can i concatenate various value to form a unique key
Update:#!/usr/bin/perl -w use strict; my %hash; $hash{'my_mother=Nice,my_brother=Great;3;45;987;'}='True'; foreach my $key (keys %hash) { print "$key VALUE =$hash{$key}\n"; } __END__ prints: my_mother=Nice,my_brother=Great;3;45;987; VALUE =True
$hash{"$value1;$value2;$value3;$value4;$value5"} = 123;
is "better" (provided that ";" doesn't occur in the $values).
The reason for the ";" is so that there will always be a unique value even
if one of the $value vars is ""!.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: can i concatenate various value to form a unique key
by Anonymous Monk on Jul 03, 2009 at 10:19 UTC | |
by Marshall (Canon) on Jul 03, 2009 at 12:19 UTC |