MoniqueLT has asked for the wisdom of the Perl Monks concerning the following question:
I find myself doing the same thing repeatedly so I would like to make a method with 3 different variables to pass in as the parameters. Is there a way to do this, I could not find a subroutine example online to see the correct format. The format below is wrong and it shows what I'm looking for
Thank you
example:
Extract($filename, $filepath, $regex) { do stuff }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Subroutines with Parameters
by davido (Cardinal) on Nov 04, 2013 at 01:56 UTC | |
by Anonymous Monk on Nov 04, 2013 at 03:32 UTC | |
|
Re: Subroutines with Parameters
by LanX (Saint) on Nov 04, 2013 at 00:55 UTC | |
|
Re: Subroutines with Parameters
by kcott (Archbishop) on Nov 04, 2013 at 05:05 UTC |