perl -MFile::Basename -e 'my ($file,$path,$suffix) = fileparse( "./hackday.txt", qr/\..*?\z/ ); print "$path -> $file -> $suffix\n" '