foreach my $j (0..$i-1) { $SUB = $j."Textfield_MaxText"; ... *$SUB = sub { variableMaxText(0); }; #### $SUB = "1Foo"; *$SUB = sub {print "$SUB!\n"}; 1Foo(); Bareword found where operator expected at -e line 3, near "1Foo" (Missing operator before Foo?) #### $SUB = "1Foo"; *$SUB = sub {print "$SUB!\n"}; &{"1Foo"}; __END__ 1Foo!