my $file = '/home/bla/fasel.txt'; my ( $filename, $dirname ) = fileparse($file);