in reply to How to use a scalar variable to call a subroutine?

Read perlref. You need to do something like &{$filename}. BTW, your example code won't work anyway.
sub mysub($) { my $str = shift; #code } $filename = 'somefile.ext'; open IN, $filename; $subref = <$filename>; # maybe it's 'mysub'? chomp $subref; no strict 'refs'; no strict 'subs'; &{$subref}( 'text' );
Hope this helps,

Jeroen
"We are not alone"(FZ)