-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Abigail <> wrote in
news::
> Eric J. Roode () wrote on MMMDCXXXIX
> September MCMXCIII in
> <URL:news:Xns93DAD6841E7E9sdn.comcast@206.127.4.25 >: ~~ -----BEGIN
> PGP SIGNED MESSAGE----- ~~ Hash: SHA1
> ~~
> ~~ (Mark Jason Dominus) wrote in
> news:bhok6j$70f$: ~~
> ~~ > Is this:
> ~~ >
> ~~ > @s = qw(a b);
> ~~ > $z = shift(@s) . shift(@s);
> ~~ > print $z;
> ~~ >
> ~~ > guaranteed to print "ab"?
> ~~ >
> ~~
> ~~ Yes. Unlike C, Perl's order-of-evaluation is well-defined.
>
>
> Where is its order of evaluation documented? Where in the
> documentation does it say that:
>
> @a = (3, 4, 5);
> $z = shift (@a) + shift (@a) * shift (@a);
> print $z;
>
> results in 23 being printed?
Well, I don't know. I could have sworn that I either read it in some
authoritative place, or I heard some authority state it. But searching
through the docs, and searching online, I can't find anything to back up
my statement. I withdraw it.
Thanks for your nice warm fuzzy tone, Abigail.
I also should have noticed who was posing the question. MJD knows much
more about Perl, especially its internals, than I do. If I had noticed
that he was the one who had asked the question, I wouldn't have responded
with my quick, unresearched answer; MJD certainly has as many or more
resources and history of Perl knowledge as myself.
- --
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/AwUBP0E7HWPeouIeTNHoEQJ7hACeNY/pVLoGaPyX5PTTrlD0fymLMlwAoIsL
KIJXOu+HZbq2hmjlHs5PL2js
=UYis
-----END PGP SIGNATURE-----