in reply to removing the last word
But it is better to use core module if such one exists - File::Basename in this case. Thus you will not make mistake while reinventing the wheel.my $full = '/usr/local/jboss'; my ($dir, $file) = $full =~ m|(.+)/(.+)|;
|
|---|