Using some kind of a dispatch table might be a more secure solution.
In reply to Re: Executing perlcode from variable by choroba in thread Executing perlcode from variable by ASadon