in reply to Paths in Perl
'course, there's a different issue if you're writing a CGI script which accepts a file upload.
Assuming you want to extract the filename from the pathname, I've been known to use something along the lines of this:
but if anyone has a better solution then I'd be interested to hear it.my ($filename) = ($pathname =~ m|[/\\:]([^/\\:]+)$|);
andy.
In Section
Tutorials