On Thursday 20 July 2006 12:27 pm, Charles K. Clarkson wrote:
> tom arnall wrote:
> : Whatever happened to good old:
> :
> :     my (@data,$result);
>
>     Why declare these ...
>
> :     @number = (1,2,3);
> :     $sum = 0;
>
>     And then use these?
>
>     Go ahead. Hit yourself upside the head. :)
>
>
>     Yet another reason to declare variables only as they are
> first used.
>
>

and of course i didn't run the code after changing '$result' to '$sum', etc. 
apologies. but i still don't u'stand why people used the more difficult 
idioms in answer to the newbie's question.

Tom Arnall
north spit, ca



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