in reply to perl eval

eval print $param;
That code prints out the value of $param, then evals the return value of print. You probably want something like:
my $result = eval $param; die "eval failed: $@" unless defined $result; print $result;