If you just want to remove the last "word" then:
my $full = '/usr/local/jboss'; my ($path, $tail) = $full =~ m|^(.*/)(.*?)$|; print "Path: $path\n"; print "Tail : $tail";
In reply to Re: removing the last word
by GrandFather
in thread removing the last word
by s_gaurav1091
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |