[Subject Prev][Subject Next][Thread Prev][Thread Next][Subject Index][Thread Index]

Re: initialising number of vars in perl



At 12:11 AM 3/13/2001 +0530, you wrote:
Hi all,

How do I assign an initial value to a number of scalar variables?

my ($a, $b, $c, $n ) = 'NULL';

doesn't work 'coz left side is list context.

my $a, $b, $c, $n = 'NULL'

assigns 'NULL' only to $n.

What about
my $a = $b = $c = $n = 'NULL';

Just guessing; such a syntax works in C.


--
Kiran Jonnalagadda
http://www.pobox.com/~jace