The following perl code should print
A B:C D
A B
C D
but instead it prints
A B:C D
A
B
C
D
I have used split before and never noticed such behavior.
I got the same problem on
perl v5.6.1 running on Red Hat Linux release 7.3 (Valhalla) (2.4.33.2)
and
perl v5.14.2 running on Ubuntu 12.04.5 LTS (3.5.0-54-generic)
Am I missing something ?
Thank you
In reply to split(/:/, $t) splits also on white space by Nagarjuna
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |