in reply to Re: Passing three arrays to a subroutine
in thread Passing three arrays to a subroutine

But why even use prototypes in the sub?
$my_exp = myCurveX(\@my_arx,\@my_ary,\@my_arz,$my_v1,$my_v2); sub myCurveX(){ my ($arrayref1, $arrayref2,$arrayref3, $v1, $v2) = @_;

You say "why even use prototypes" and then you use a prototype that says accept zero arguments, but the next line says to accept five arguments?

Replies are listed 'Best First'.
Re^3: Passing three arrays to a subroutine
by zentara (Cardinal) on Nov 09, 2010 at 19:34 UTC
    Well you have to read in values into the sub somehow, unless you use global variables. How else would he do it?

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh
      You missed the point. The problem isn't that you accept five arguments; the problem is that you use a prototype that says "accept zero arguments". There's also the matter that you use a prototype after saying there's no reason to use prototypes here.