
StarkRavingCalm
User
May 16, 2013, 11:11 AM
Post #1 of 3
(996 views)
|
Remove extensiton from existing string
|
Can't Post
|
|
Hi all - I am using an existing string for other requirements (i.e. I dont want to change it) but need to filter out the file extension. I see basename as being a very good option for doing so but cannot seem to get it to work. Does anyone have a suggestion? Here is the existing string:
my %local_files; foreach my $file (</directorypath/fileprefix*>) { $local_files{basename($file)} = (stat($file))[7]; }
|