[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
[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,
> 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
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], $
<[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
[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
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
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
> 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 -
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
[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 @
Can someone show me how to pass multiple arrays argument?
ie -
...
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 not working
}
thanks
12 matches
Mail list logo