mattwortho has asked for the wisdom of the Perl Monks concerning the following question:
I would ideally like to parse each line and have all the numbers of a single line in an array, saymy $line1 = "[HAVE 1324,2,32,324,5,643] my $line2 = "[HAVE 4,213,5432,4]
After reading the first line, it should contain (1324,2,32,324,5,643) and after reading the second line it should contain (4,213,5432,4). Not sure how to match strings when the format isn't constant. Thanks in advance for your help, Matt.my @numbers =();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: String Matching
by Anno (Deacon) on Sep 18, 2007 at 11:32 UTC | |
|
Re: String Matching
by bruceb3 (Pilgrim) on Sep 18, 2007 at 11:38 UTC | |
|
Re: String Matching
by mattwortho (Acolyte) on Sep 18, 2007 at 11:32 UTC | |
|
Re: String Matching
by ciderpunx (Vicar) on Sep 18, 2007 at 12:11 UTC |