why does perl complain "Use of implicit split to @_ is deprecated"
Posted
by Haiyuan Zhang
on Stack Overflow
See other posts from Stack Overflow
or by Haiyuan Zhang
Published on 2010-03-12T21:54:33Z
Indexed on
2010/03/12
21:57 UTC
Read the original article
Hit count: 461
perl
the code triger the complain is as below :
#!/usr/bin/perl
use strict;
use warnings;
my $s = "aaa bbb";
my $num_of_item = split(/\s+/, $) ;
print $num_of_item;
when I run the code, perl complains that "Use of implicit split to @_ is deprecated" . I really have no "context" for the problem, so expect you help to explain what's wrong with the code.
© Stack Overflow or respective owner