ISAI student has asked for the wisdom of the Perl Monks concerning the following question:
Hello all. I am looking at an old script that I am "renovating", and I saw the following line of code, which will serve as an example:
$thread = threads->create(\&execute, $i, $reg_info_hashRef, $erbose);
I want the threads->create to check that I input the right number of arguments (execute is prototyped). This means that the code should look like this:
I know that using ampersand disables the prototype test. Should removing just enable the prototype test, and/or do anything else? Thanks.$thread = threads->create(\execute, $i, $reg_info_hashRef, $erbose);
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: effects of ampersand and non ampersand when referencing a sub name
by tobyink (Canon) on Dec 20, 2012 at 08:56 UTC | |
Re: effects of ampersand and non ampersand when referencing a sub name
by Jenda (Abbot) on Dec 20, 2012 at 10:00 UTC | |
by tobyink (Canon) on Dec 20, 2012 at 17:55 UTC | |
Re: effects of ampersand and non ampersand when referencing a sub name
by jwkrahn (Abbot) on Dec 20, 2012 at 08:49 UTC | |
Re: effects of ampersand and non ampersand when referencing a sub name
by ISAI student (Scribe) on Dec 20, 2012 at 10:52 UTC | |
by LanX (Saint) on Dec 20, 2012 at 11:17 UTC |
Back to
Seekers of Perl Wisdom