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

Replies are listed 'Best First'.
Re: Re: use strict
by rsiedl (Friar) on Jun 01, 2004 at 14:21 UTC
    Thanks for your post.
    I wasnt so much interested in solving this problem, more so in the how/why it doesnt work.
    I'll try and do a bit more research on symbolic references.
    Cheers,
    Reagen