Re: The number of elements in an array

2003-01-16 Thread John W. Krahn
Robert Monical wrote: > > At 01:12 AM 1/16/2003 -0800, you wrote: > > > >An array in scalar context return the number of elements in the array so > >you probably want: > > > > for ( my $x = 0; $x < @amen; $x++ ) { > > > >Or the more Perlish way: > > > > for my $x ( 0 .. $#amen

Re: The number of elements in an array

2003-01-16 Thread Robert Monical
At 01:12 AM 1/16/2003 -0800, you wrote: Robert Monical wrote: > > Hello, Hello, > I'm away from my Perl book and hope one of you will help me. > > Would somebody please remind me how to make this line work > > for ($x=0;$x<$#{@amen};$x++){ > > right now, the loop only executes once. An

Re: The number of elements in an array

2003-01-16 Thread John W. Krahn
Robert Monical wrote: > > Hello, Hello, > I'm away from my Perl book and hope one of you will help me. > > Would somebody please remind me how to make this line work > > for ($x=0;$x<$#{@amen};$x++){ > > right now, the loop only executes once. An array in scalar context return the n

Re: The number of elements in an array

2003-01-16 Thread Victor Tsang
for ($x=0; $x < scalar(@amen); $x++) Tor. Robert Monical wrote: > > Hello, > > I'm away from my Perl book and hope one of you will help me. > > Would somebody please remind me how to make this line work > > for ($x=0;$x<$#{@amen};$x++){ > > right now, the loop only executes once. >

The number of elements in an array

2003-01-16 Thread Robert Monical
Hello, I'm away from my Perl book and hope one of you will help me. Would somebody please remind me how to make this line work for ($x=0;$x<$#{@amen};$x++){ right now, the loop only executes once. TIA Robert Monical [EMAIL PROTECTED] (mailing list stuff) [EMAIL PROTECTED] (everything