Split words (Split String) is divided by a string of variables required to store the Pattern string to break into the A-ray.
split (/ character to break a word /, variables like divided, the number you want).
Eg.
$ a = "Hello, Welcome Perl \ n";
@ a = split (/ /, $ a);
# Find a divide words when spaces 1 box (/ /) Therefore, @ a = ( "Hello,", "Welcome", "Perl \ n").
@ a = split (/ /, $ a, 2);
# Find a divide words when spaces 1 box (/ /) The amount to only 2 Therefore, the @ a = ( "Hello,", "Welcome").
Split word in string
วันจันทร์ที่ 14 กันยายน พ.ศ. 2552
สมัครสมาชิก:
ส่งความคิดเห็น (Atom)
0 ความคิดเห็น:
แสดงความคิดเห็น