in reply to Dynamically calling different functions?

how about 'eval'?

Your loop would become:

print; s/(?<=\S)\s/ \$register,/; $register= eval $_; print "currently: $register\n"; print "------\n";
Yes, I have to admit that it's a bit ugly because of the RE.
Update: Thanks to rediablo for showing me that "eval" is unwanted.

Replies are listed 'Best First'.
Re: Re: Dynamically calling different functions?
by revdiablo (Prior) on Jul 01, 2003 at 18:41 UTC

    Hi. I just wanted to let you know I downvoted your node, and give you a reason why. If you read the original question, the OP explicitly says he does not want to use eval. It's not just a subtle hint:

    data that's outside of my control (so please don't say "eval( <perl> )" right away ;^) [emphesis mine]

    I'm not trying to rub a downvote in your face, I just wanted to let you know my reasons. Please don't take it personally. =^)

    Update: glad to see I've been downvoted (if only very little... downvoted nonetheless) for being honest and straightforward. Maybe I should reconsider my strategy and simply snipe at people from the dark.

      I downvoted Skeeve's posting as well because it was promoting the wreckless use of eval and also completely ignored the request. It's jut not very valuable advice.

      I guess people just don't appreciate it much when you try and explain your motivation for downvoting. My token ++ might not count for much, but it's all I can do.
      Thanks for telling me.

      I really didn't see the eval-hint. Maybe I have to read more carefully. I also shouldn't stop when I think I have enough information when ther actually is more text ahead...

      I gave you ++ for being informative. I hate it when I get downvoted and don't know why.