Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

conflict between unshift documentation and behavior

1 view
Skip to first unread message

Joe Wells

unread,
Apr 20, 1990, 8:29:02 PM4/20/90
to
(Perl 3.0 patchlevel 18)

This program:

print unshift (a, "testing\n");

prints this output:

testing

contrary to the documentation:

unshift(ARRAY,LIST)
Does the opposite of a shift. Or the opposite of a push,
depending on how you look at it. Prepends list to the front of
the array, and returns the number of elements in the new array.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

--
Joe Wells <j...@bu.edu>
jbw%bucsf....@cs.bu.edu
...!harvard!bu-cs!bucsf!jbw

0 new messages