On Sun, Mar 07, 2004 at 12:41:18AM +, Angie Ahl wrote:
> However I get them now. And for any other newbies out there... go look
> up references right now... really.
In my case it was references and lists-vs-arrays (and how hashes fit
into all this) that caught me. The moment they both had beco
I must chime in.
I've been learning perl for pretty much exactly a year now. I Still
feel like a newbie.
I haven't yet got to the chapters on Prototypes and Inheritance, I've
read about the concepts but not yet applied them.
I've been using subroutines and modules quite a bit and references
r
zsdc wrote:
> Mallik wrote:
>
> > Dear Friends,
> >
> > I need to pass 3 parameters to a subroutine, in which the
> > first parameter is an array and the last two parameters
> > are strings.
> >
> > @abc = qw(1 2 3);
> > $x = 4;
> > $y = 5;
> >
> > testsub(@abc, $x, $y);
>
> Hello Mallik,
>
> I've
In a message dated 3/7/2004 6:58:57 AM Eastern Standard Time, [EMAIL PROTECTED]
writes:
>This is quite a common and simple problem for which reading the whole
>perldoc perlsub might be somewhat too confusing, but asking about it on
>mailing lists usually starts discussions which often become arg
Mallik wrote:
Dear Friends,
I need to pass 3 parameters to a subroutine, in which the
first parameter is an array and the last two parameters
are strings.
@abc = qw(1 2 3);
$x = 4;
$y = 5;
testsub(@abc, $x, $y);
Hello Mallik,
I've just read this thread and I'd like to add one more way to solve
William Gunther wrote:
>
> If a beginner can understand the concept
> of prototyping and referencing, I think they can gather an array
> reference is being passed.
Actually no. I have not seen this in the last year of reading this list. The
vast majority of newbie traffic that i have seen amo
R. Joseph Newton wrote:
> > Hi Malik,
> >
> > If you pass a reference to the array as the first argument as below
> you can
> > keep the array separate from the other arguments you are passing.
> >
> > @abc = qw(1 2 3);
> > $x = 4;
> > $y = 5;
> >
> > testsub([EMAIL PROTECTED], $x, $y
[EMAIL PROTECTED] wrote:
> In a message dated 3/3/2004 5:15:57 AM Eastern Standard Time,
> [EMAIL PROTECTED] writes:
> >testsub(@abc, $x, $y);
> >
> >sub testsub(@$$)
> >{
> >(@abc, $x, $y) = @_;
> >print "Array @abc\n";
> >print "x $x\n";
> >print "y $y\n";
> >}
>
> sub testsub ([
"Halkyard, Jim" wrote:
Hi Jim,
It is better if you don't top-post.
> Hi Malik,
>
> If you pass a reference to the array as the first argument as below you can
> keep the array separate from the other arguments you are passing.
>
> @abc = qw(1 2 3);
> $x = 4;
> $y = 5;
>
> testsub([EMAIL PROTECTE
In a message dated 3/3/2004 5:15:57 AM Eastern Standard Time,
[EMAIL PROTECTED] writes:
>testsub(@abc, $x, $y);
>
>sub testsub(@$$)
>{
>(@abc, $x, $y) = @_;
>print "Array @abc\n";
>print "x $x\n";
>print "y $y\n";
>}
sub testsub ([EMAIL PROTECTED]);
@abc = (1, 2, 3);
$x = 3;
$y =
> From: Mallik [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, 3 March 2004 1:00 AM
> To: Perl Beginners
> Subject: Passing array as First argument
> Importance: High
>
> Dear Friends,
>
> I need to pass 3 parameters to a subroutine, in which the
> first paramete
abc\n";
print "x $x\n";
print "y $y\n";
}
See perldoc perlref for a much better explanation than I could give.
Jim
-Original Message-
From: Mallik [mailto:[EMAIL PROTECTED]
Sent: 02 March 2004 14:00
To: Perl Beginners
Subject: Passing array as First ar
Dear Friends,
I need to pass 3 parameters to a subroutine, in which the
first parameter is an array and the last two parameters
are strings.
@abc = qw(1 2 3);
$x = 4;
$y = 5;
testsub(@abc, $x, $y);
sub testsub(@$$)
{
(@abc, $x, $y) = @_;
print "Array @abc\n";
print "x $x\n";
pri
Dear Friends,
I need to pass 3 parameters to a subroutine, in which the
first parameter is an array and the last two parameters
are strings.
@abc = qw(1 2 3);
$x = 4;
$y = 5;
testsub(@abc, $x, $y);
sub testsub(@$$)
{
(@abc, $x, $y) = @_;
print "Array @abc\n";
print "x $x\n";
pr
14 matches
Mail list logo