Re: how to pass multi array as args

2003-11-16 Thread R. Joseph Newton
[EMAIL PROTECTED] wrote: > > sub mysub { > > my( $x, $y, $z ) = @_; > > Can I have three arrays instead? Sure, if you don't mind having all items from all lists offered as arguments laoded into the first array. Joseph -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional com

Re: how to pass multi array as args

2003-10-27 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > > > If you prototype your subroutine as > > > > sub mysub ([EMAIL PROTECTED]@\@) > > I saw that prototying in the docs. Does perl programmer use prototyping? I'm not sure what you mean here? Rob -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: how to pass multi array as args

2003-10-27 Thread perl
> If you prototype your subroutine as > > sub mysub ([EMAIL PROTECTED]@\@) I saw that prototying in the docs. Does perl programmer use prototyping? thanks - eMail solutions by http://www.swanmail.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For

RE: how to pass multi array as args

2003-10-27 Thread perl
It took a while, but I got the reference syntax down with the referencing calls like $$x[int] and @$x. thanks > [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > : > : > sub mysub { > : > my( $x, $y, $z ) = @_; > : > : Can I have three arrays instead? > : > : I know I can use $x->[0], $

Re: how to pass multi array as args

2003-10-26 Thread Rob Dixon
<[EMAIL PROTECTED]> wrote: > > > sub mysub { > > my( $x, $y, $z ) = @_; > > Can I have three arrays instead? > > I know I can use $x->[0], $x->[1], etc. But can I make it a @x, @y, @z? If you prototype your subroutine as sub mysub ([EMAIL PROTECTED]@\@) then you can subsequently ca

RE: how to pass multi array as args

2003-10-26 Thread Charles K. Clarkson
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: : : > sub mysub { : > my( $x, $y, $z ) = @_; : : Can I have three arrays instead? : : I know I can use $x->[0], $x->[1], etc. But can I make : it a @x, @y, @z? Question: If this is all that is relevant to your question, why continu

RE: how to pass multi array as args

2003-10-26 Thread Charles K. Clarkson
Max <[EMAIL PROTECTED]> wrote: : : I test this and it works, there must be some other : way, but i am only a newbie on perl, : : mysub("@a", "@b", "@c"); : : sub mysub { : my @a = shift; : my @b = shift; : my @c = shift; : } Let's try a little test: #!/usr/bin/perl use strict; use

Re: how to pass multi array as args

2003-10-26 Thread Max
I test this and it works, there must be some other way, but i am only a newbie on perl, > mysub(@a, @b, @c); mysub("@a", "@b", "@c"); > sub mysub > { my @a = ? #arg1 an array $_[0] is not working > my @b = ? arg2 another array $_[1] is not working > my @c = ? arg3 another array $_[2] is n

RE: how to pass multi array as args

2003-10-26 Thread perl
> sub mysub { > my( $x, $y, $z ) = @_; Can I have three arrays instead? I know I can use $x->[0], $x->[1], etc. But can I make it a @x, @y, @z? -thanks > [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] wrote: > : > : Can someone show me how to pass multiple arrays argument? > : > : ie -

RE: how to pass multi array as args

2003-10-26 Thread Tore Aursand
On Sun, 26 Oct 2003 01:52:21 -0700, perl wrote: >> sub mysub { >> my( $x, $y, $z ) = @_; > Can I have three arrays instead? Why would you have that? There are a lot of advantages by using references. -- Tore Aursand <[EMAIL PROTECTED]> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For a

RE: how to pass multi array as args

2003-10-25 Thread Charles K. Clarkson
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] wrote: : : Can someone show me how to pass multiple arrays argument? : : ie - Read perlsub. You can use references. : : ... : mysub(@a, @b, @c); mysub( [EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED] ); : ... : : sub mysub : { my @