chen li wrote:
>
> --- "John W. Krahn" <[EMAIL PROTECTED]> wrote:
>
>>chen li wrote:
>>
>>>6)$mean = eval(join("+", @data)) / @data;
>>>
>>>Depending on how you understand Perl and what
>>progress
>>>you are I prefer 6).
>>Depending on how you understand Perl, 6 is the worst
>>solution.
>
> Could you explaind why 6) is the worst?
Because it uses string eval which means that the code has to be compiled at
run-time and it could introduce a security hole if you don't know what @data
contains and it's a cute trick and cute tricks should only be used in cute
programs.
John
--
use Perl;
program
fulfillment
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>