Thanks for the info...  I didn't think to try this...

---------------------------
Jason H. Frisvold
Senior ATM Engineer
Engineering Dept.
Penteledata
CCNA Certified - CSCO10151622
[EMAIL PROTECTED]
---------------------------
"Imagination is more important than knowledge. Knowledge is limited.
Imagination encircles the world." -- Albert Einstein [1879-1955]


-----Original Message-----
From: John W. Krahn [mailto:[EMAIL PROTECTED]] 
Sent: Wednesday, May 29, 2002 6:54 PM
To: [EMAIL PROTECTED]
Subject: Re: variable initialization

Jason Frisvold wrote:
> 
> I stumbled across a bug in my own code I figured I'd share...
Actually,
> I'm wondering if there is a way to do this....
> 
> I was using the following code :
> 
> my ($var1, $var2) = 0;
> 
> The intent was to initialize the variables to 0.  However, as I found
> out a few minutes ago, this only initializes the first variable in the
> list to 0 and leaves the others as undefined...
> 
> Is there an easy way to do this?  I know I can do them this way :
> 
> my ($var1, $var2) = (0,0);
> or
> my $var1 = 0;
> my $var2 = 0;
> 
> But I was looking for something similar to what I was doing...


my $var1 = my $var2 = 0;


John
-- 
use Perl;
program
fulfillment

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to