http://qs321.pair.com?node_id=358017


in reply to use strict

You get errors because you are using symbolic references. If that is what you want, turn strictness off (at least in those blocks you are using them). Don't slab strictness on existing code if you don't know the implications. Don't dance to the pipes of strictness either - a programmer shouldn't be a slave of the language, at least not if the language is Perl.

A way of solving this while using strict:

my @interests = ("foo", "bar", "blah"); my %hash; foreach (@interest) { $hash {$_} = "My interest is $_"; } foreach (@interest) { print $hash {$_}, "\n"; }

Abigail