in reply to Re: Isolating a file name
in thread Isolating a file name
It occurs to me that if you don't know the extension in advance, this approach would be more flexible.
use strict; use warnings; use File::Basename; my $s = "/home/virtual/path/to/www/some/directory/filename.txt"; my ($base,$path,$ext) = fileparse($s,'\..*'); print "$base\n";
Scott
|
|---|