Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
So it looks like you don't get the empty first element only if both args to split are omitted. Which means you must be splitting $_ on whitespace. Otherwise I guess you would.If EXPR is omitted, splits the $_ string. If PATTERN is also
omitted, splits on whitespace (after skipping any leading
whitespace).
$ad = " 0 600 600 ";
@values = split ' ', $ad;
As a special case, specifying a PATTERN of space (' ') will split on white space just as split with no arguments does. Thus, split(' ') can be used to emulate awk's default behavior, whereas split(/ /) will give you as many null initial fields as there are leading spaces. A split on /\s+/ is like a split(' ') except that any leading whitespace produces a null first field. A split with no arguments really does a split(' ', $_) internally.