in reply to How a for() assignment works

Perhaps you want:

for my $var ( map lc, @vars ) { print "Value: " . $hash_ref->{$var} . "\n" if exists $hash_ref->{$ +var}; }

Replies are listed 'Best First'.
Re^2: How a for() assignment works
by Herkum (Parson) on Mar 06, 2008 at 21:28 UTC
    Had not thought of doing something inside the (), though I guess I should have known better.