for (split /(A)|B/, "1A2B3") {print "'$_' defined\n" if (defined);}