-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
If I use the /o on a regex, is it available package wide for the
duration of the program or is it bound by some other scope???
I want to optimize a loop that parses lines from a file...
/o means that the regex gets compiled once, and never again until the
program exits. There is no scope associated with it.
Internally, when a regular expression with the /o modifier is encountered,
the perl RE engine first compiles the regular expression, then patches the
OP tree so that the pattern does not get examined again (it's as if the
pattern is a constant string at that point).
- --
Eric
$_ = reverse sort $ /. r , qw p ekca lre uJ reh
ts p , map $ _. $ " , qw e p h tona e and print
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 7.0.3 for non-commercial use <
http://www.pgp.com>
iQA/AwUBP5mKz2PeouIeTNHoEQI3awCg5Ls01aDG1eaOpjdpwrzqSHXESQMAoOoN
YtBjtyEY9O0lE55cBybFO6sV
=feTi
-----END PGP SIGNATURE-----