P is for Practical | |
PerlMonks |
Re^2: Removing digits until you see | in a stringby Animator (Hermit) |
on Jan 08, 2007 at 12:04 UTC ( [id://593518]=note: print w/replies, xml ) | Need Help?? |
That solution is wrong. What if the string contains a newline? Or multiple newlines? Anything that follows after the newline will not be removed. I could suggest using s/...//s but I'm not going to do that. This code will be slower then it has to be - and it doesn't give the information you want. It just starts removing text from a | until a newline. My suggestion is the same as ysth's: Re: Removing digits until you see | in a string
In Section
Seekers of Perl Wisdom
|
|