note
idsfa
<p>You don't want (capturing) parentheses, you want square brackets (a character class, see [doc://perlre|perlre]):</p>
<code>
my $string = "foo / bar & etc";
my @parts = split(m# [&/] #,$string);
print join("\n",@parts,"");
</code>
<p>(Note the extra null string to tack a newline onto the "etc", and the use of a different matching delimiter to avoid the need to escape the forward slash -- the ampersand never needed to be escaped )</p>
<!-- Node text goes above. Div tags should contain sig only -->
<div class="pmsig"><div class="pmsig-195379">
<hr/>
<I>The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon</I>
</div></div>
577644
577644