Re: Can arrays be used as scalars?

2002-12-13 Thread Paul Barker
- Original Message - From: RCTay To: [EMAIL PROTECTED] Sent: Sunday, November 24, 2002 8:06 AM Subject: Can arrays be used as scalars? my( @dir, $free);@dir =3D `dir`;$free =3D $dir[$#dir]; This code was written by a friend of mine. "@dir" wa

Re: Can arrays be used as scalars?

2002-11-28 Thread csaba . raduly
On 24/11/2002 08:06:35 RCTay wrote: my( @dir, $free); @dir =3D `dir`; $free =3D $dir[$#dir]; This code was written by a friend of mine. @dir was declared as a array, but in the second line it is used as a scalar. How is that possible? There are no warnings given by the interpreter. Can you

Re: Can arrays be used as scalars?

2002-11-28 Thread tran bao toan
please do not send me anymore email, thanks! [EMAIL PROTECTED] wrote: On 24/11/2002 08:06:35 RCTay wrote:my( @dir, $free);@dir =3D `dir`;$free =3D $dir[$#dir];This code was written by a friend of mine. "@dir" was declared asaarray, butin the second line it is used as a scalar. How is thatpossible?