Because you know where you want to stop matching, you really should drop .* and use a negated character class instead:my ( $keep ) = $string =~ /^(.*?)\|/;
my ( $keep ) = $string =~ /^([^\|]+)/;
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to Re: Re: using split without $junk
by jeffa
in thread using split without $junk
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |