zer has asked for the wisdom of the Perl Monks concerning the following question:
Top of the mornin!
Ive been hacking around all night and I have gargled some code which is confusing me.
I was obfuscating sorry.perl -wle '$_="a"x20;s/(?{print "${^O}rules".-"${0}macs"})//g'|wc -l
the idea is that no matter what you change the length of $_ to, it is always going to run the print command 2x the number plus two. I am speculating that this number may change on different platforms. But anyways. What is the logic here? What is the regex doing to come to that magical number of executes?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: (${code}) Regex - Iteration
by oha (Friar) on Oct 17, 2007 at 09:45 UTC | |
Re: (${code}) Regex - Iteration
by ikegami (Patriarch) on Oct 17, 2007 at 13:16 UTC |
Back to
Seekers of Perl Wisdom