>>>>> "Peter" == Peter Rabbitson <[EMAIL PROTECTED]> writes:

Peter> Is there a quick way to initialize a number of variables at once? 
Something 
Peter> like 

Peter> my ($var1, $var2, $var3);

Peter> but instead of having undef in all of them, let's say I want to have 1 
in 
Peter> each. Any takers?

First, I generally don't declare a lot of variables at the beginning
of my program.  I introduce them into the smallest scope where they
make sense.  Globals Are Evil.  Haven't you heard? :)

Second, if I do have three variables to declare, I do them with
separate statements, so I can also COMMENT them.  You *do* comment
your variables, right?

my $rate = 23; # how fast are we going, initially
my $age = 43; # getting old!

etc.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

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