should do the trick - match a forward slash (\/), then match one or more non-forward slashes ([^\/]+).$var =~ s/\/[^\/]+//;
If you don't like having to escape those forward slashes, you can choose another token - i prefer braces because they don't bork my syntax highlighter:
$var =~ s{/[^/]+}{};
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 (jeffa) Re: delete something from a variable
by jeffa
in thread delete something from a variable
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |