[Roma.pm] maledetti array!
LordOfDeath
webmaster.staff at gmail.com
Tue Apr 24 12:04:23 PDT 2007
Adriano Ferreira ha scritto:
> On 4/24/07, LordOfDeath <webmaster.staff at gmail.com> wrote:
>
>> ciao a todos, da tutto oggi che cerco la funzione in perl che mi dice
>> che se nell'array @numeri=("1","2","34"); (numeri presi a caso) mi dica
>> qual'è il più grande... vorrei evitare di fare i foreach, sperando che
>> ci sia una funzione apposita :( saluti a todos, grazie!!
>>
>
> use List::Util qw(max);
>
> $max = max(@numeri)
>
> Leggere la documentazione a
> http://search.cpan.org/~gbarr/Scalar-List-Utils-1.19/lib/List/Util.pm
> o
> http://perldoc.perl.org/List/Util.html
>
>
>
>> _______________________________________________
>> Roma mailing list
>> Roma at pm.org
>> http://mail.pm.org/mailman/listinfo/roma
>>
>>
> _______________________________________________
> Roma mailing list
> Roma at pm.org
> http://mail.pm.org/mailman/listinfo/roma
>
>
grazie mille!!!!! era proprio quello che mi serviva!!! :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/roma/attachments/20070424/38e704e0/attachment.html
More information about the Roma
mailing list