Following would be a better approach to keep the splitting pattern as well.
@out = split /(~)/, $stringIn reply to Re^2: regex replacement help
by samarzone
in thread regex replacement help
by mkenney
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |