in reply to Too many arguments for main::

You are defining get_Origserver with a prototype, telling perl that this function receives no arguments (see perlsub). Leave the parens() off of the function definition. BTW, you can get the same effect of the goto in a more perlish way by defining a block and using redo:
LABEL: { ... redo LABEL; }

Replies are listed 'Best First'.
Re^2: Too many arguments for main::
by tadman (Prior) on Oct 30, 2002 at 06:51 UTC
    Or what about this?
    while (1) { # print ... if (...) { # ... last; } elsif (...) { # ... last; } }
    This is an infinite loop that can be "broken" with the last command. I find using labels to be rather pointless in most circumstances. After all, you can redo a block with no label at all.
      This is an infinite loop that can be "broken" with the last command. I find using labels to be rather pointless in most circumstances. After all, you can redo a block with no label at all.

      Hmm, several last statements vs. one redo. It may be a matter of taste, but the lazy programmer in me likes the one redo better. And its true you don't need loop labels in this instance, and on a shorter loop I'd leave the label off. I try to avoid long loop structures, but if there is one, I prefer having a label as an easy way to see where it starts.

        To be sarcastic, I'd suggest labelling your if statements so you didn't lose track of them either.

        The multiple-break versus single-redo is, as you've suggested, a matter of personal preference. It is, in a sense, the difference between implicit behavior, or that which is implied by program structure, and explicit behavior, or that which is expressed with statements.

        But, as they say, to each their own.