in reply to Strict, strings and subroutines
You could try using an eval.
Hope this helps.#!/usr/bin/perl -w use strict; my $type = 'hatter'; my $arg = 'using eval'; my $proc = "do_$type"; eval "$proc( \$arg )"; die( "Eval errored: $@" ) if $@; sub do_hatter { my( $foo ) = @_; print "This can be done $foo.\n"; }
--
Graq
|
---|
In Section
Seekers of Perl Wisdom