Le Sun, 30 Dec 2012 15:13:20 +0100, Chloe Sival a écrit:
Je dois récupérer chaque valeur dans une variable, mais mon probleme est qu'entre les data il y a des espaces/tab qui varie.
Dans une regexp, par défaut s capture à la fois les espaces et les tabulations. Donc
while (<$file>) { @data = split /s+/ ; }
doit faire ce que tu veux.
-- That ideas should freely spread from one to another over the globe, for the moral and mutual instruction of man, and the improvement of his conditions, seems to have been peculiarly and benevolently designed by nature, when she made them, like fire, expansible over all space, without lessening their density in any point, and like the air in which we breathe, move, and have our physical being, incapable of confinement of exclusive appropriation. Inventions then cannot, in nature, be a subject of property. Thomas Jefferson.
Le Sun, 30 Dec 2012 15:13:20 +0100, Chloe Sival a écrit:
Je dois récupérer chaque valeur dans une variable, mais mon probleme est
qu'entre les data il y a des espaces/tab qui varie.
Dans une regexp, par défaut s capture à la fois les espaces et les
tabulations. Donc
while (<$file>) {
@data = split /s+/ ;
}
doit faire ce que tu veux.
--
That ideas should freely spread from one to another over the globe,
for the moral and mutual instruction of man, and the improvement of his
conditions, seems to have been peculiarly and benevolently designed by
nature, when she made them, like fire, expansible over all space,
without lessening their density in any point, and like the air in which
we breathe, move, and have our physical being, incapable of confinement
of exclusive appropriation. Inventions then cannot, in nature, be a
subject of property.
Thomas Jefferson.
Le Sun, 30 Dec 2012 15:13:20 +0100, Chloe Sival a écrit:
Je dois récupérer chaque valeur dans une variable, mais mon probleme est qu'entre les data il y a des espaces/tab qui varie.
Dans une regexp, par défaut s capture à la fois les espaces et les tabulations. Donc
while (<$file>) { @data = split /s+/ ; }
doit faire ce que tu veux.
-- That ideas should freely spread from one to another over the globe, for the moral and mutual instruction of man, and the improvement of his conditions, seems to have been peculiarly and benevolently designed by nature, when she made them, like fire, expansible over all space, without lessening their density in any point, and like the air in which we breathe, move, and have our physical being, incapable of confinement of exclusive appropriation. Inventions then cannot, in nature, be a subject of property. Thomas Jefferson.
Chloe Sival
Le 30/12/2012 20:39, Emmanuel Florac a écrit :
Le Sun, 30 Dec 2012 15:13:20 +0100, Chloe Sival a écrit:
Je dois récupérer chaque valeur dans une variable, mais mon probleme est qu'entre les data il y a des espaces/tab qui varie.
Dans une regexp, par défaut s capture à la fois les espaces et les tabulations. Donc
while (<$file>) { @data = split /s+/ ; }
doit faire ce que tu veux.
Genial exactement ce que je veux faire
merci beaucoup
Le 30/12/2012 20:39, Emmanuel Florac a écrit :
Le Sun, 30 Dec 2012 15:13:20 +0100, Chloe Sival a écrit:
Je dois récupérer chaque valeur dans une variable, mais mon probleme est
qu'entre les data il y a des espaces/tab qui varie.
Dans une regexp, par défaut s capture à la fois les espaces et les
tabulations. Donc