Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Portable file extensions for executables

2 views
Skip to first unread message

Tom Dailey

unread,
Feb 20, 2009, 2:33:20 PM2/20/09
to
I need to create a full filename for an executable in a portable fashion. I
have the filename WITHOUT extension. I can get the correct extension via
$Config{"_exe"}. However, the catfile method in File::Spec doesn't have a
separate extension argument. So how do I append the extension (if there is
one) to the executable's filename? Is there a catext function/method
somewhere?

Thanks,
Tom Dailey

News123

unread,
Feb 25, 2009, 2:17:26 PM2/25/09
to
Hi Tom,

Is there any reason, that you post your question to alt.comp.lang.perl
and not to comp.lang.perl.misc

comp.lang.perl.misc is much more visited than alt.comp.lang.perl and you
should get much more answers.


I never used File::Spec,

but shouldn't this work?

File::Spec->catfile( @directories, $filename. $Config{"_exe"} );

(Assumming $COnfig->{"_exe"} contains the extnsion with the 'dot'.


bye


N

0 new messages