On Sun, Jul 12, 2009 at 14:31, Dan<d...@entropy.homelinux.org> wrote:
> Hi people.
>
> Is the order of results from a join() operation guaranteed ( assuming my
> array doesn't change, of course )?
snip

Interesting, the docs for the join function make no guarantee about
the order of the join; however, the historic order has been first
element, second element, etc.  This is unlikely to change (if for no
other reason than it would make join useless).  Also, in the tests for
the Perl interpreter, there is the following code:

@x = (1, 2, 3);
if (join(':',@x) eq '1:2:3') {print "ok 1\n";} else {print "not ok 1\n";}

This seems to be a fairly strong promise that join will operate in the
expected manor.


-- 
Chas. Owens
wonkden.net
The most important skill a programmer can have is the ability to read.

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to