in reply to Paths in Perl
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: CGI Re: Paths in Perl
by rob_au (Abbot) on Nov 16, 2002 at 01:36 UTC |