You need to take a look at File::Basename
or simply with regex
$file = "/opt/local/bin/zap.exe"; $file =~ s|.*/||s; print $file; output: zap.exe
updated: As per frodo72 suggestion. Thanks frodo72
Prasad
In reply to Re: remove directory path
by prasadbabu
in thread remove directory path
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |