in reply to Can't use string

Others have pointed to reasons why you get the error message. Let me try to guess what you want instead:
use strict; use warnings; my %value_for; $value_for{'row10'} = 1; # # later... my $key = 'row' . 10; print $value_for{$key};
If you want a hash, you have to give it a name, unless you make it an anonymus hash of course.