rkg has asked for the wisdom of the Perl Monks concerning the following question:
UPDATE:use strict; use File::Spec::Functions; use File::Basename; my $file = 'test.txt'; my ($base,$path,$type) = fileparse($file, qr/\.txt/); print "base=$base path=$path type=$type\n"; print catfile($path, $base, '.xml'); # test\.xml
The issue is the comma vs. a period in the catfile... sorry I did not catch this earlier.
print catfile($path, $base . '.xml');
|
|---|