It's rather simple: split uses the pattern you supply as a separator. So it split the list into two items "" and "" separated by "201004061749". Then (as described in the split documentation), since you have parenthesis in your pattern, split inserts the captured groups into the result list. So it's returning ("", "2010", "04", "06", "17", "49", "").
I'm guessing you really wanted to use the match operator and assign the list of captured values to your list of variables.
UPDATE: I just tried it, and was mistaken, there's no "" at the end of the list that split returns:
[13:19:56] /DOS/c/Program Files/Bank of America/EFS $ perl -e '$_="201004061749";print "<",join(".",split/(\d\d\d\d)(\d\d) +(\d\d)(\d\d)(\d\d)/),">"' <.2010.04.06.17.49>
...roboticus
In reply to Re: I thought I understood split...
by roboticus
in thread I thought I understood split...
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |