Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer

Re: use strict

by Abigail-II (Bishop)
on Jun 01, 2004 at 12:58 UTC ( #358017=note: print w/replies, xml ) Need Help??

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"; }


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.

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://358017]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (3)
As of 2023-03-23 05:48 GMT
Find Nodes?
    Voting Booth?
    Which type of climate do you prefer to live in?

    Results (60 votes). Check out past polls.