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 06:49 UTC
    Many thanks. This works perfectly.