in reply to How do I extract a file name from a path string
$filepath = '/u/test/global/filename.txt'; my ( @data ) = split /\//, $filepath; my ( $filename ) = $data[$#data]; print "$filename" ; ## will print filename.txt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Answer: How do I extract a file name from a path string
by TedPride (Priest) on Oct 09, 2004 at 19:59 UTC | |
|
Re: Answer: How do I extract a file name from a path string
by TVSET (Chaplain) on Oct 09, 2004 at 17:04 UTC | |
by ysth (Canon) on Oct 10, 2004 at 19:11 UTC |