my %v; # my hash for user variables $v{Sam}++; # or: my $name = 'Sam'; $v{$name}++;