Hello, I would like to report that the current documentation for the split command is erronerrous. http://perldoc.perl.org/functions/split.html says:
-- In time-critical applications, it is worthwhile to avoid splitting into more fields than necessary. Thus, when assigning to a list, if LIMIT is omitted (or zero), then LIMIT is treated as though it were one larger than the number of variables in the list; for the following, LIMIT is implicitly 4: 1. ($login, $passwd, $remainder) = split <http://perldoc.perl.org/functions/split.html>(/:/); -- Calling the third argument $remainer is simply wrong - the remainder is the fourth argument, which is not assigned to anything. This must come from some edit of the older version of the documentation, which can be found e.g. at http://www.tu-chemnitz.de/docs/perldoc-html/functions/split.html : -- The LIMIT parameter can be used to split a line partially ($login, $passwd, $remainder) = split <http://www.tu-chemnitz.de/docs/perldoc-html/functions/split.html>(/:/, $_, 3); When assigning to a list, if LIMIT is omitted, or zero, Perl supplies a LIMIT one larger than the number of variables in the list, to avoid unnecessary work. For the list above LIMIT would have been 4 by default. In time critical applications it behooves you not to split into more fields than you really need. -- When I wanted to report this, I found it hard to find out where and how I should report. There is a contacts section at the bottom of the page, but neither Joe Allen's link nor the link to the project page seem to work - and reporting to the perl 5 porters list did not seem adequate. So I hope this is the right list to report such issues. Anša
