On Fri, 11 Mar 2005, Peter Rabbitson wrote:

> Is there a quick way to initialize a number of variables at once? Something 
> like 
> 
> my ($var1, $var2, $var3);
> 
> but instead of having undef in all of them, let's say I want to have 1 in 
> each. Any takers?

Yes.

    my ($var1, $var2, $var3) = (1, 1, 1);

 

-- 
Chris Devers

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to