Re: initialize arrays

2005-04-05 Thread John Doe
Am Dienstag, 5. April 2005 15.32 schrieb [EMAIL PROTECTED]: > Are these two statements the same? > > my (@array, @array1) = ( ); > > my @array = my @array1 = ( ); let's try: $ perl use strict; use warnings; my (@array, @array1) = ( ); my @brray = my @brray1 = (); print @array ? 1 : 0,"\n"; prin

RE: initialize arrays

2005-04-05 Thread Charles K. Clarkson
[EMAIL PROTECTED] wrote: : Are these two statements the same? : : my (@array, @array1) = ( ); : : my @array = my @array1 = ( ); According to Data::Dumper the results are the same. print Dumper [EMAIL PROTECTED], [EMAIL PROTECTED]; But then this has the same

RE: initialize arrays

2005-04-05 Thread DBSMITH
cc 04/05/2005 10:17 AMSubject RE: i

RE: initialize arrays

2005-04-05 Thread Larsen, Errin M HMMA/IT
> -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] > Sent: Tuesday, April 05, 2005 9:24 AM > To: Charles K. Clarkson > Cc: beginners@perl.org > Subject: RE: initialize arrays > <> > [EMAIL PROTECTED] <mailto:[EMAIL PROTEC

Re: initialize arrays

2005-04-05 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: I am just playing with variable assign. I always initialize my arrays first as I need them. Then of your two examples this makes the most sense; my(@array,@array1); but if you are simply doing: my( @array, @array1 ); @array = foo(); @array1 = bar(); then it'd be much bett

Re: initialize arrays

2005-04-05 Thread Offer Kaye
On Apr 5, 2005 4:29 PM, Larsen, Errin M HMMA/IT wrote: > > Hi everyone, > > this one made me wonder. Isn't there a way to get Perl to print out > exactly how it evaluates the statements that are written? Sure - the B modules, such as B::Debug and B::Concise. > If so, we > could use that to

Re: initialize arrays

2005-04-05 Thread John W. Krahn
[EMAIL PROTECTED] wrote: Are these two statements the same? my (@array, @array1) = ( ); my @array = my @array1 = ( ); $ perl -le' my $x = q/my (@array, @array1) = ( );/; my $y = q/my @array = my @array1 = ( );/; print "These two are ", $x eq $y ? "" : "NOT ", "the same."; ' These two are NOT the sa