On Mon, 2002-05-13 at 18:07, Scott Lutz wrote:
> I am wondering about the different ways of initializing a single scalar.
> 
> usual method:
> my $variable;
> 
> but I am trying to get what (if anything) is being done differently by
> this :
> my ($variable);
> 
> Thanks!
> 
> 
> Scott Lutz
> Pacific Online Support
> Phone: 604.638.6010
> Fax: 604.638.6020
> Toll Free: 1.877.503.9870
> http://www.paconline.net

The parentheses allow you to declare more than one variable at a time
like this:

my ($id, $name, $age);

They also allow you to do a list assignment (instead of a scalar
assignment) like this:

my ($id, $name, $age) = $sth->fetchrow_array;
 
-- 
Today is Pungenday the 60th day of Discord in the YOLD 3168


Missile Address: 33:48:3.521N  84:23:34.786W


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

Reply via email to