in reply to delete something from a variable
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)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: (jeffa) Re: delete something from a variable
by Anonymous Monk on Jul 06, 2002 at 20:53 UTC | |
by jeffa (Bishop) on Jul 06, 2002 at 20:59 UTC |