The expressions you use in split (unlike join) are regex's. '?' is a special character (zero or one) in a regex. You will need to escape '?' with a '\' (Ex. "\?").
You should use -w or use warnings because what you did would have shown up as the warning
Quantifier follows nothing before HERE mark in regex m/? << HERE
| Unix - where you can throw the manual on the keyboard and get a command |
In reply to Re: Trying to split on '?'
by grep
in thread Trying to split on '?'
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |