rkg has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to use catfile in File::Spec::Functions, and am mildly befuddled. Not a big deal, but why does the following code yield  test\.xml, rather than  test.xml? I must be swapping the order of the arguments in one of the two functions...? Seems like I missing something obvious in the docs...

rkg

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
UPDATE:

The issue is the comma vs. a period in the catfile... sorry I did not catch this earlier.

print catfile($path, $base . '.xml');