$file = "/opt/local/bin/zap.exe"; $file = (split(/\//, $file))[-1]; print $file;