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 :
You 'll print the ascii code of each element in the returned list by split function. Here's the output i get :map { print ord $_,"\n" } split(/./, $ip);
00 is the ascii NUL and 10 is the newline character. I hope you understand these explanations, Arnaud
0
0
0
0
10
In Section
Seekers of Perl Wisdom