http://qs1969.pair.com?node_id=296694


in reply to Split on . (dot)

hi, In you code, split returns all fields found in $ip using '.' metacharacter as a delimiter. '.' metacharacter matches almost any character but newline. As a consequence,@t will contain invisible characters as NUL character and \n. When you do :
map { print ord $_,"\n" } split(/./, $ip);
You 'll print the ascii code of each element in the returned list by split function. Here's the output i get :
0 
0
0
0
0
10
0 is the ascii NUL and 10 is the newline character. I hope you understand these explanations, Arnaud