LPM: Subroutine references, or something ...
Rich Bowen
rbowen at rcbowen.com
Thu Jul 15 14:53:39 CDT 1999
I do thing weird thing where I figure out which subroutine I'm going to
call based on arguments/parameters. Then I'll do something like:
($foo, $bar) = &{$routine}(@args);
Works fine.
The problem is that if I "use strict", I get "Can't use string
("whatever") as a subroutine ref while "strict refs" in use at fubar.pl
line 99."
My solution thus far has been to "use strict 'vars';" But I would like
to understand what that error message really means, and how I can do
what I'm doing another way, so that I can "use strict". Any help or
pointers (references?) greatly appreciated.
Rich
--
It seems to me as we make our own few circles 'round the sun
We get it backwards and our seven years go by like one
--Rush, 'Dog Years' (Test for Echo, 1996)
More information about the Lexington-pm
mailing list