On May 29, Jason Frisvold said:

>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 :

Well, you could always do something like

  my ($x, $y, $z) = (0) x 3;

-- 
Jeff "japhy" Pinyan      [EMAIL PROTECTED]      http://www.pobox.com/~japhy/
RPI Acacia brother #734   http://www.perlmonks.org/   http://www.cpan.org/
** Look for "Regular Expressions in Perl" published by Manning, in 2002 **
<stu> what does y/// stand for?  <tenderpuss> why, yansliterate of course.
[  I'm looking for programming work.  If you like my work, let me know.  ]


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

Reply via email to