remluvr has asked for the wisdom of the Perl Monks concerning the following question:
and say another one that's like this:DISTINGUERE TRA;1;14;507;0,000000242475382686773;0,0000033946553576148 +2;0,000122935019022194;0,00000000041732202096217;9,18246152003019;9,1 +8246152003019 MANCANTE DI;1;56;507;0,000000242475382686773;0,0000135786214304593;0,0 +00122935019022194;0,00000000166928808384868;7,18246152003019;7,182461 +52003019 APPLICARE SU;1;64;507;0,000000242475382686773;0,0000155184244919535;0, +000122935019022194;0,00000000190775781011278;6,9898164420878;6,989816 +4420878 MONTATO IN;1;78;507;0,000000242475382686773;0,0000189130798495683;0,00 +0122935019022194;0,00000000232507983107495;6,70441422322555;6,7044142 +2322555 IMPIEGATO IN;2;180;507;0,000000484950765373545;0,0000436455688836191;0 +,000122935019022194;0,00000000536556884094218;6,49796334575812;12,995 +9266915162 RAGGRUPPARE IN;1;109;507;0,000000242475382686773;0,0000264298167128582 +;0,000122935019022194;0,00000000324915002034832;6,22163211731087;6,22 +163211731087
where "MANCANTE DI" and "RAGGRUPPARE IN" are missed. I'd like to know if it's possibli to build two arrays from these data, that are made just of the last numerical value we have for every text value. And where the values that are missed are automatically set to 0. Let's say, something like this:DISTINGUERE TRA;1;14;507;0,000000242475382686773;0,0000033946553576148 +2;0,000122935019022194;0,00000000041732202096217;9,18246152003019;9,1 +8246152003019 APPLICARE SU;1;64;507;0,000000242475382686773;0,0000155184244919535;0, +000122935019022194;0,00000000190775781011278;6,9898164420878;6,989816 +4420878 MONTATO IN;1;78;507;0,000000242475382686773;0,0000189130798495683;0,00 +0122935019022194;0,00000000232507983107495;6,70441422322555;6,7044142 +2322555 IMPIEGATO IN;2;180;507;0,000000484950765373545;0,0000436455688836191;0 +,000122935019022194;0,00000000536556884094218;6,49796334575812;12,995 +9266915162
Is it possible? How would you do it? Thanks,$1=[9,18246152003019; 7,18246152003019; 6,9898164420878; 6,70441422322 +555; 12,9959266915162; 6,22163211731087]</br> $2=[9,18246152003019; 0; 6,9898164420878; 6,70441422322555; 12,9959266 +915162; 0]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Importing data to build an array
by Perlbotics (Archbishop) on Feb 21, 2009 at 22:34 UTC | |
by remluvr (Sexton) on Feb 22, 2009 at 08:47 UTC | |
by remluvr (Sexton) on Feb 22, 2009 at 10:31 UTC | |
|
Re: Importing data to build an array
by bichonfrise74 (Vicar) on Feb 21, 2009 at 19:10 UTC | |
|
Re: Importing data to build an array
by johngg (Canon) on Feb 22, 2009 at 17:05 UTC | |
by Anonymous Monk on Feb 22, 2009 at 19:45 UTC | |
by johngg (Canon) on Feb 22, 2009 at 21:16 UTC | |
|
Re: Importing data to build an array
by sanku (Beadle) on Feb 23, 2009 at 09:22 UTC |