So if File::Basename is working properly, perhaps your input is messed up somehow? Are you reading your filenames from a file perhaps and forgetting to chop off the newline?(fastolfe) gemina:~$ cat test use File::Basename; fileparse_set_fstype('MSWin32'); # Because I'm on Unix while (<DATA>) { chomp; printf("%20s %s\n", $_, basename($_)); } __DATA__ a:\pic3.jpg a:\some\dir\pic.jpg a:\some\other\pic \blah\pic. a:\pic a:pic.jpg a:\pic3. (fastolfe) gemina:~$ perl test a:\pic3.jpg pic3.jpg a:\some\dir\pic.jpg pic.jpg a:\some\other\pic pic \blah\pic. pic. a:\pic pic a:pic.jpg pic.jpg a:\pic3. pic3.
In reply to Re: Re: Quick Regex question
by Fastolfe
in thread Quick Regex question
by Stamp_Guy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |