This code triggers the complaint below:
#!/usr/bin/perl
use strict;
use warnings;
my $s = \"aaa bbb\";
my $num_of_item = split(/\\s+/, $s) ;
print $num_of_
Let diagnostics provide more information:
use strict;
use warnings;
use diagnostics; # comment this out when you are done debugging
my $s = "aaa bbb";
my $num_of_item = split(/\s+/, $s) ;
print $num_of_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).
A better way to get diagnostic info is from the command line:
perl -Mdiagnostics my_program.pl