in reply to Re: Dynamically calling different functions?
in thread Dynamically calling different functions?

I confess, I had done some reading about all this stuff before... how does this relate to the "no strict 'refs';" stuff? I just tried out this code, and it appears as though you're getting around the:
use strict; $name = "call_this_func"; &{$name}();

...restrictions (which I don't quite understand). Is it because you are calling a function of an object? Or is it because you are using the $a->() format? My perl-fu is weak, but I would appreciate some understanding. Thanks!

--Robert

Replies are listed 'Best First'.
Re: Re: Re: Dynamically calling different functions?
by artist (Parson) on Jun 30, 2003 at 20:41 UTC
    Straight from the docs:

    strict subs' : This disables the poetry optimization, generating a compile-time error if you try to use a bareword identifier that's not a subroutine, unless it appears in curly braces or on the left hand side of the "=>" symbol.

    artist