If you want to generically remove the last element, and save it to $bar, you can do:$a =~ s/\/great$//;
I hope this helps.$a =~ s/(\/.*)$//; $bar = $1;
In reply to Re: help on reg ex
by Improv
in thread help on reg ex
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |