good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
My first instinct would be to look through CPAN and find a module that parses how you want. Do you have control over the un-parsed form of the data? Then someone else has almost certainly gone through all the thought processes you need to do.
For the particular case you are dealing with, and if you are sure that the form of the input data will always be "space, non-space characters, colon, digits" then you could use a regex thus: The output is: The disadvantage of this is that it does depend on regular input and won't tell you if there is a breakdown in the input, but just spit out rubbish. Better to get a module for general use. § George Sherston In reply to Re: split question
by George_Sherston
|
|