A split will only work, if the filename is delimited by a backslash ('\'). Under DOS/Windows, there is still the nasty and often overlooked possibility of having a filename like c:myfile.ext, which is a valid filename, meaning a file on the drive c: in the current directory for drive c:.
So the split should at least be on [\\:], but if we want real portability, I second the use of File::Basename, which is in the standard Perl distribution.
In reply to Re: Re: Quick Regex question
by Corion
in thread Quick Regex question
by Stamp_Guy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |