Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Problems? Is your data what you think it is?
 
PerlMonks  

Re: Expanding Variable Names in Calls to Subroutines

by LD2 (Curate)
on Jul 11, 2001 at 02:37 UTC ( [id://95580]=note: print w/replies, xml ) Need Help??

This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.


in reply to Expanding Variable Names in Calls to Subroutines

This should work, granted hasn't been tested on Linux:
$count = shift; my $routine; for($runs = 1; $runs <= $count; $runs++){ $routine = "func_$runs"; &{$routine}; }
For more information, try Super Search or Google. You may find How to use a scaler variable to call a subroutine to be of interest as well.

Replies are listed 'Best First'.
Re: Re: Expanding Variable Names in Calls to Subroutines
by sicrj (Initiate) on Jul 11, 2001 at 02:49 UTC
    Many thanks. This works perfectly.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://95580]
help
Sections?
Information?
Find Nodes?
Leftovers?
    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.