Come for the quick hacks, stay for the epiphanies. | |
PerlMonks |
Re: Removing digits until you see | in a stringby inman (Curate) |
on Jan 08, 2007 at 09:31 UTC ( [id://593492]=note: print w/replies, xml ) | Need Help?? |
A couple of suggestions. The following uses a substituation and removes the index from the rest of the data (i.e. the original data is changed).
This uses matches the index and remaing data without altering the original. I have used a conditional to assess the validity of the assignment beforehand. This is useful for data processing where the quality of the data is variable.
In Section
Seekers of Perl Wisdom
|
|