diff --git a/lib/Path/Tiny.pm b/lib/Path/Tiny.pm index 58862e4..e65e322 100644 --- a/lib/Path/Tiny.pm +++ b/lib/Path/Tiny.pm @@ -682,7 +682,7 @@ sub assert { $name = path("foo/bar.txt")->basename; # bar.txt $name = path("foo.txt")->basename('.txt'); # foo - $name = path("foo.txt")->basename(qr/.txt/); # foo + $name = path("foo.txt")->basename(qr/\.txt/); # foo $name = path("foo.txt")->basename(@suffixes); Returns the file portion or last directory portion of a path.