More than one way?
my $filename = (split m{/} => $full_path)[-1];I agree however that File::Basename is way better, as it also deals with filesystems other than Unix-like that use a forward slash.
In reply to Re^2: how to remove everything before last slash in perl?
by Tux
in thread how to remove everything before last slash in perl?
by mipatel
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |