Re: How to remove [], {}, and other characters, rendering numeric values in a CSV file ?

2008-07-08 Thread perez . erasmo
Hi dear Rob and friends from the list: Thank you very much for your great help. The code is now running flawlessly :-) Thank you very much for your time and shared knowledge Will try to give back a little bit of the much help received in this great community Kind regards Erasmo On 05/07/2008

Re: How to remove [], {}, and other characters, rendering numeric values in a CSV file ?

2008-07-05 Thread Rob Dixon
[EMAIL PROTECTED] wrote: > > I have discovered that the number between square brackets [] won't be > only a one-digit number, but now it can contain an un-foreseen number > of digits, because the number inside the square brackets will grow > from 1 to several millions > > As I have just stated, w

Re: How to remove [], {}, and other characters, rendering numeric values in a CSV file ?

2008-07-04 Thread perez . erasmo
A la cluster[1] = { 2 3 4 8 10 14 } cluster[2] = { 2 3 4 8 10 14 } ... cluster[1234567] = { 2 3 4 8 10 14 } ... cluster[45689080] = { 2 3 4 8 10 14 } thank you very much On 04/07/2008, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi dear Yitzle and Perl list: > > I have discovered that the nu

Re: How to remove [], {}, and other characters, rendering numeric values in a CSV file ?

2008-07-04 Thread perez . erasmo
Hi dear Yitzle and Perl list: I have discovered that the number between square brackets [] won't be only a one-digit number, but now it can contain an un-foreseen number of digits, because the number inside the square brackets will grow from 1 to several millions As I have just stated, with a one

Re: How to remove [], {}, and other characters, rendering numeric values in a CSV file ?

2008-06-26 Thread John W. Krahn
Erasmo Perez wrote: Hi dear list: Hello, Thank you very much for you great help in solving my past issue, regarding the removing of the trailing commas and points. Thank you very much indeed :-) Now, my last (I hope) issue. I got another text file in the following format: cluster[1] = { 2

Re: How to remove [], {}, and other characters, rendering numeric values in a CSV file ?

2008-06-26 Thread Dr.Ruud
yitzle schreef: > while ( my $line = <> ) { > $line =~ /cluster\[(\d)+\] = {([\d ]+)}/ or die; > my @vals = split( / +/, "$1 $2" ); > print join(",", @vals) . "\n"; > } Less strict alternative: while (<>) { my @vals = /([0-9]+)/g or die; print join(",", @vals) . "\n";

Re: How to remove [], {}, and other characters, rendering numeric values in a CSV file ?

2008-06-26 Thread perez . erasmo
Hi dear Yitzle: Thank you very much for your great help :-) Your perl code works great ! The problem was indeed from my side, since I was over-confident in the (mis)use of blank space (a beginner sin) But now your code works, thank to your helpful replies and I now i got my a... neck covered A

Re: How to remove [], {}, and other characters, rendering numeric values in a CSV file ?

2008-06-26 Thread yitzle
On Thu, Jun 26, 2008 at 5:22 PM, <[EMAIL PROTECTED]> wrote: > Hi Yitzle: > > Thank you very much for your suggestion: > > Here is my perl file: clusters.pl > > #! /usr/bin/perl > use warnings; > use strict; > while (my $line = <>) { > $line = ~/cluster\[(\d)+\] = {([\d ]+)}/ or die; > my @vals =

Re: How to remove [], {}, and other characters, rendering numeric values in a CSV file ?

2008-06-26 Thread perez . erasmo
Hi Yitzle: Thank you very much for your suggestion: Here is my perl file: clusters.pl #! /usr/bin/perl use warnings; use strict; while (my $line = <>) { $line = ~/cluster\[(\d)+\] = {([\d ]+)}/ or die; my @vals = split(/+/,"$1 $2"); print join(",",@vals). "\n"; } my input file (clusters.i

Re: How to remove [], {}, and other characters, rendering numeric values in a CSV file ?

2008-06-26 Thread yitzle
On Thu, Jun 26, 2008 at 3:28 PM, Erasmo Perez <[EMAIL PROTECTED]> wrote: > Hi dear list: > > Thank you very much for you great help in solving my past issue, > regarding the removing of the trailing commas and points. > > Thank you very much indeed :-) > > Now, my last (I hope) issue. > > I got ano

How to remove [], {}, and other characters, rendering numeric values in a CSV file ?

2008-06-26 Thread Erasmo Perez
Hi dear list: Thank you very much for you great help in solving my past issue, regarding the removing of the trailing commas and points. Thank you very much indeed :-) Now, my last (I hope) issue. I got another text file in the following format: cluster[1] = { 2 3 4 8 10 14 } cluster[2] = { 25