Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, How to pass more than one input in perl functions
  • Comment on how to pass more than one input in perl

Replies are listed 'Best First'.
Re: how to pass more than one input in perl
by akho (Hermit) on May 27, 2009 at 06:01 UTC
    Read perlintro. Or a book.

    All arguments to a subroutine come in a special list called @_.

Re: how to pass more than one input in perl
by CountZero (Bishop) on May 27, 2009 at 06:27 UTC
    my_func('A', 'list', 'of', 'multiple', 'arguments', 'to', 'my', 'function');

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re: how to pass more than one input in perl
by irah (Pilgrim) on May 27, 2009 at 07:30 UTC

    Read man perlsub from man pages.