my $str = 'params.$idx.arg'; #### for my $idx (0..10) { &do_something($str); }