Hi,
"perldoc -f split" gives...
In scalar context, returns the number of fields found and splits into the @_ array. Use of split in scalar context is deprecated, however, because it clobbers your subroutine arguments.
So..."0" is the number of fields found and your particular usage is deprecated (at least as of 5.8.0), which you may or may not care about. Compare the following code just for kicks.
perl -e '$p = "::"; @m = ($p =~ /(:)/g); print scalar @m, "\n"'
,welchavw
In reply to Re: split empty (lead|trail)ing fields
by welchavw
in thread split empty (lead|trail)ing fields
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |