--
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:
--
- ($login, $passwd, $remainder) = split(/:/);
The LIMIT parameter can be used to split a line partially
($login, $passwd, $remainder) = split(/:/, $_, 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.
--
On Tue, 19 Jun 2012 09:58:17 +0200You can use the perlbug utility for that:
Anša Vernerová <ans...@gmail.com> wrote:
> I would like to report that the current documentation for the split command
> is erronerrous.
> http://perldoc.perl.org/functions/split.html says:
>
http://perldoc.perl.org/perlbug.html