agynr has asked for the wisdom of the Perl Monks concerning the following question:
Hello Monks,
Is there any alternative for pos to find the position of the last search, as in my document it takes a lot of time on that particular statement. I am using Perl Builder as the editor and I have to wait a long for the position to calculate.
You must be reading your timings wrong, as a call to pos($scalar) returns merely a value stored with $scalar, and thus is always quite fast. Most likely you are using a suboptimal regular expression to set pos, or your data is large and what you want to do just takes time.