tulsyan has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks,
I am getting very confusion with the error.
The above coding doesn't work. It is showing an error message.use strict; my $SubroutName='test'; my $text='abcdefgijkl'; &$SubroutName($text); sub test{ print "\nokey!"; } sub test1{ print "\nokey!"; } sub test2{ print "\nokey!"; }
Can't use string ("test") as a subroutine ref while "strict refs" in u +se at 1.p l line 4.
But, when I comment the line use strict; It is working well.
Can you leave your comments, why it is not working when I use use strict
Thank You,
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Error Message when I use Strict
by Zaxo (Archbishop) on Jul 29, 2005 at 08:32 UTC | |
Re: Error Message when I use Strict
by holli (Abbot) on Jul 29, 2005 at 08:39 UTC | |
by Anonymous Monk on Jul 29, 2005 at 11:50 UTC | |
by Joost (Canon) on Jul 29, 2005 at 12:48 UTC | |
by holli (Abbot) on Jul 29, 2005 at 12:39 UTC | |
Re: Error Message when I use Strict
by Anonymous Monk on Jul 29, 2005 at 08:31 UTC | |
Re: Error Message when I use Strict
by MonkPaul (Friar) on Jul 29, 2005 at 17:04 UTC |
Back to
Seekers of Perl Wisdom