in reply to How to use a scalar variable to call a subroutine?
Hope this helps,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' );
Jeroen
"We are not alone"(FZ)
|
|---|