I have this strange problem with split in that it does not by default split into the default array.
Below is some toy code.
#!/usr/bin/perl
$A="A:B:C:D";
split (":",$A);
print $_[0];
This does not print anything. However if I explicitly split into the default array like
#!/usr/bin/perl
$A="A:B:C:D";
@_=split (":",$A);
print $_[0];
It's correctly prints A. My perl version is v5.22.1.
@_is not "the default array".@_is the array that contains parameters to a subroutine. There is nothing in the Perl documentation that calls it the default array.