On 5 February 2012 22:33, Ronald J Kimball <rjk@tamias.net> wrote: > On Sun, Feb 05, 2012 at 07:46:55PM +0100, demerphq wrote: >> On 5 February 2012 19:27, Tom Christiansen <tchrist@perl.com> wrote: >> > But why mention /ee distinct from /e? It's not special. >> > You can have /eee and /eeee if you want. eeeeetc. >> >> Yes I know, but /ee and /eeee are synonyms. And /ee *is* distinct from >> /e. See the docs for more details. > > /ee and /eeee are not synonyms. /ee performs two evals; /eeee performs > four. I stand corrected, thanks for pointing that out, I definitely did not know that. $ perl -wle'sub foobar{"zoo"}; sub zoo { "giraffe" }; $_=qq("foo"); $x=qq(. "bar"); s/("foo")/$1 . $x/; print' "foo" . . "bar" $ perl -wle'sub foobar{"zoo"}; sub zoo { "giraffe" }; $_=qq("foo"); $x=qq(. "bar"); s/("foo")/$1 . $x/e; print' "foo". "bar" $ perl -wle'sub foobar{"zoo"}; sub zoo { "giraffe" }; $_=qq("foo"); $x=qq(. "bar"); s/("foo")/$1 . $x/ee; print' foobar $ perl -wle'sub foobar{"zoo"}; sub zoo { "giraffe" }; $_=qq("foo"); $x=qq(. "bar"); s/("foo")/$1 . $x/eee; print' zoo $ perl -wle'sub foobar{"zoo"}; sub zoo { "giraffe" }; $_=qq("foo"); $x=qq(. "bar"); s/("foo")/$1 . $x/eeee; print' giraffe I do wonder if this is intentional or an interesting implementation side effect. Yves -- perl -Mre=debug -e "/just|another|perl|hacker/"Thread Previous | Thread Next