470,591 Members | 2,282 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,591 developers. It's quick & easy.

split bug? sure not, but...?

do u know why

print "\n a)", scalar split /:/, ':';
print "\n b)", scalar split /:/, ':f';
print "\n c)", scalar split /:/, ':f:';

writes:

a)0
b)2
c)2

and not

a)1
b)2
c)2

as i expected?
ok for trailing fields (perlfunc says they are deleted so b an c give
same result), but shouldnt perl find an empty leading field splitting
':' ?

thanks
Jul 19 '05 #1
0 1247

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by uc_sk | last post: by
1 post views Thread by Don Hames | last post: by
4 posts views Thread by mannyGonzales | last post: by
4 posts views Thread by Steven D'Aprano | last post: by
14 posts views Thread by tom t/LA | last post: by
11 posts views Thread by mrkafk | last post: by
7 posts views Thread by AMP | last post: by
1 post views Thread by mad.scientist.jr | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.