David> Ton script ne te retourne pas toujours la meme image si tu
    David> ne changes pas le nombre de fichiers dans ton
    David> /home/ivank/pic/wallpaper/ ?  Regarde du cote de srand pour
    David> changer le seed de la fonction random.

Tirer de la perl faq:

,----
|       If you're using a version of Perl before 5.004, you must
|       call ""srand"" once at the start of your program to seed the
|       random number generator.  5.004 and later automatically call
|       ""srand"" at the beginning.  Don't call ""srand"" more than
|       once-you make your numbers less random, rather than more.
`----

Je me sert de perl 5.6 donc je n'ai plus besoin d'appeler srand. Si
quelqu'un set sert d'une version inférieur a 5.04 il devra ajouter
srand avand d'apperler rand.

Cordialement,

Ivan

Linux-Azur :      http://www.linux-azur.org
Désinscriptions: http://www.linux-azur.org/liste.php3
**** Pas de message au format HTML, SVP ****

Répondre à