rsiedl has asked for the wisdom of the Perl Monks concerning the following question:
Hi,
I have finally been converted to 'use strict' and now I am learning how to use it properly.
Is it possible to do the following (somehow) while using strict?
Cheers,
Reagen
Update: I wasnt so much interested in solving this problem, more so in the how/why it doesnt work.
Thanks everyone for your help - I'll try and do a bit more research on symbolic references.
I have finally been converted to 'use strict' and now I am learning how to use it properly.
Is it possible to do the following (somehow) while using strict?
It works well without but returns errors when I 'use strict'.#!/usr/bin/perl my @interests = ( "foo", "bar", "blah" ); foreach (@interests) { $$_ = "My interest is $_"; } foreach (@interests) { print $$_ , "\n"; } exit;
Cheers,
Reagen
Update: I wasnt so much interested in solving this problem, more so in the how/why it doesnt work.
Thanks everyone for your help - I'll try and do a bit more research on symbolic references.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: use strict
by Abigail-II (Bishop) on Jun 01, 2004 at 12:58 UTC | |
by rsiedl (Friar) on Jun 01, 2004 at 14:21 UTC | |
Re: use strict
by dragonchild (Archbishop) on Jun 01, 2004 at 12:59 UTC | |
Re: use strict
by gjb (Vicar) on Jun 01, 2004 at 13:01 UTC | |
Re: use strict
by borisz (Canon) on Jun 01, 2004 at 13:00 UTC | |
Re: use strict
by EdwardG (Vicar) on Jun 01, 2004 at 12:51 UTC |
Back to
Seekers of Perl Wisdom