From a6d8037e26aaceac1a62ab1a36249ff12386c7ff Mon Sep 17 00:00:00 2001 From: Bo Borgerson Date: Wed, 26 Aug 2009 09:47:33 -0400 Subject: split: Remove implicit split to @_ Remove the long deprecated feature where split in scalar context writes to @_ --- pod/perldiag.pod | 6 ------ pod/perlfunc.pod | 5 +---- 2 files changed, 1 insertion(+), 10 deletions(-) (limited to 'pod') diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 9447ba44f1..1f7bc0bc8e 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -4742,12 +4742,6 @@ to access the filehandle slot within a typeglob. operator. Since C always tries to match the pattern repeatedly, the C has no effect. -=item Use of implicit split to @_ is deprecated - -(D deprecated, W syntax) It makes a lot of work for the compiler when you -clobber a subroutine's argument list, so it's better if you assign the results -of a split() explicitly to an array (or list). - =item Use of inherited AUTOLOAD for non-method %s() is deprecated (D deprecated) As an (ahem) accidental feature, C subroutines diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index fd28b00e7e..776aaf25ef 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -5471,10 +5471,7 @@ Splits the string EXPR into a list of strings and returns that list. By default, empty leading fields are preserved, and empty trailing ones are deleted. (If all fields are empty, they are considered to be trailing.) -In scalar context, returns the number of fields found. In scalar and void -context it splits into the C<@_> array. Use of split in scalar and void -context is deprecated, however, because it clobbers your subroutine -arguments. +In scalar context, returns the number of fields found. If EXPR is omitted, splits the C<$_> string. If PATTERN is also omitted, splits on whitespace (after skipping any leading whitespace). Anything -- cgit v1.2.1