Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Re: The "anchor" misnomer in regexes

by itub (Priest)
on Dec 17, 2005 at 05:01 UTC ( #517435=note: print w/replies, xml ) Need Help??

in reply to The "anchor" misnomer in regexes

If the regex were really anchored (that is, immovable), it would find the end of the string, and then match the regex in that context -- that is, the regex would have to terminate at the end of the string. As it stands, Perl can't optimize the regex that way, and we end up matching EVERY chunk of whitespace, and then testing to see if END-OF-STRING comes after it.
IMO, you shouldn't care about the internals of the regex engine, but about the meaning of the regex you are writing. The exact algorithm and optimizations that the engine uses may change from one version to the next, but the meaning of /#(.*?)$/ will always be the same (at least for Perl 5 ;-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://517435]
[marto]: failing that see the README
[mark4]: I installed "PAR" from the ppm install window. pp.exe. did not show up.
[marto]: it should just be a script, pp, or on windows pp.bat, post install you should just be able to call pp -x packed.exe as the PPM package should put everything required into the appropriate path
[marto]: ah, some time ago pp became it's own package, try searching your repo for PAR::Packer
[marto]: again, Strawberry + cpanm for the win: cpanm pp to install

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (7)
As of 2018-01-19 14:19 GMT
Find Nodes?
    Voting Booth?
    How did you see in the new year?

    Results (218 votes). Check out past polls.