do .² for 1…5
(1…5)»²130 karma · joined November 5, 2013
do .² for 1…5
(1…5)»²That he probably didn't google hard enough.
On top of StrawberryPerl, there is also BerryPerl which is perlbrew for Windows.
http://blogs.perl.org/users/steve_bertrand/2016/07/berrybrew...
Python as well.
>> how little Google seems to care about the language and ecosystem
Let's compare with Microsoft. The top four out of five users at StackOverFlow have top tags in C#, I guess Google have a long way to Go.
Is this paper available online? Thanks.
CHAPTER 5 Pattern Matching
Fancy Patterns - Alternate Engines
Starting with v5.10, you can even swap out Perl’s entire regex engine and replace it with an alternate pattern-matching library.
...
Table 5-18. Alternate regex engines
re::engine::RE2 - Russ Cox’s RE2 regex engine
...
One engine of special note is Russ Cox’s RE2 library. It’s a C and C++ library that’s used in the Go programming language, among many other places. The interesting thing is that it maintains a high level Perl compatibility, including good UTF-8 support, while avoiding the potential pitfalls of catastrophic backtracking. It does this because unlike Perl, whose engine is a recursive backtracker, RE2 uses a hybrid NFA/DFA approach that never gets bogged down in pathological cases.
This can be critical in time-sensitive applications where you want to let users provide their own pattern, but you cannot risk letting their search take forever. First written for Google’s Code Search, where time is of the essence, RE2 is also used via its Perl interface at http://grep.cpan.me. This site lets you enter a search pattern that runs over everything in CPAN.
...
http://steve-yegge.blogspot.hk/2006/03/execution-in-kingdom-...
http://stackoverflow.com/questions/16621738/d-is-less-effici...
http://perldoc.perl.org/functions/split.html
=====
In time-critical applications, it is worthwhile to avoid splitting into more fields than necessary. Thus, when assigning to a list, if LIMIT is omitted (or zero), then LIMIT is treated as though it were one larger than the number of variables in the list; for the following, LIMIT is implicitly 3:
($login, $passwd) = split(/:/);
=====
and by using the a2p converter,
$ a2p <<< '{ SUM+=$5 } END {printf "%d\n", SUM}'
#!/usr/bin/perl eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' if $running_under_some_shell; # this emulates #! processing on NIH machines. # (remove #! line above if indigestible)
eval '$'.$1.'$2;' while $ARGV[0] =~ /^([A-Za-z_0-9]+=)(.*)/ && shift; # process any FOO=bar switches
while (<>) { ($Fld1,$Fld2,$Fld3,$Fld4,$Fld5) = split(' ', $_, -1); $SUM += $Fld5; }
printf "%d\n", $SUM;
So this behavior is confirmed.