From: Raphael H. <ra...@ge...> - 2001-12-10 14:24:19
|
Le Mon, Dec 10, 2001 at 01:48:04PM +0100, Fabien Fulhaber écrivait: > Si la chaîne contient par exemple "SMA" et qu'il n'y a qu'une série de > donnée, il ne faut pas amha renvoyer les valeurs dans un tableau, > qu'un objet de type "Curve" n'arriverait pas à gérer. Ce n'est pas vrai :-) Le tableau à un élément est équivalent à un scalaire tel que tu l'as codé ... parce que tu renvoies le tableau @tab et non pas la référence au tableau \@tab ... > > Tu veux que je te prête mes livres sur Perl ? :-) > > Bah, j'ai déjà 2 bouquins d'O'Reilly : Tu devrais arriver à faire des expressions rationnelles alors et à extraire les informations nécessaires ... $value =~ /(\w+)\s*\(\s*(.*)\s*\)/; et juste après tu as : $1 => type d'objet $2 => source de données A+ -- Raphaël Hertzog -+- http://strasbourg.linuxfr.org/~raphael/ Le bouche à oreille du Net : http://www.beetell.com Naviguer sans se fatiguer à chercher : http://www.deenoo.com Formation Linux et logiciel libre : http://www.logidee.com |