in reply to Text match
See for example How do I retrieve the position of the first occurrence of a match? to get the position of the match. Then you could just use substr.
Update: didn't read your question carefully, thought you were talking about characters, not lines.
|
---|
In Section
Seekers of Perl Wisdom