in reply to can i concatenate various value to form a unique key

As explained else where in the thread, that has the potential to not be unique.

It's a little known feature that Perl actually supports autoconcatenation of strings used as hash keys, joining them together using $;, which by default contains "\034" which is rare enough that it's unlikely unwanted duplicates are formed. So, you can write:

my @value = @{$Config{$value1,$value2,$value3,$value4,$value5}};
without having to join them yourself.

This was how people did multilevel hashes using perl4.

For more details, see the perlvar entry about $;.

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:38 UTC
    i am initialize these variable with some default value and then will the same problem exists? and for the default key combination also hash have some value like
    my $value1 = 'x'; my $value2 = 'x'; my $value3 = 'x'; my $value4 = 'x'; ---- #code where actual value will be assigened to the variables and only $ +value2 didnt get assigned to any value so $value2='x' itself ---- my @value = @{$Config {'hai','x','there','bye'}};
    if my has have a value for thsi key also will it be an issue?