Is it possible to get Current Working Directory in miniperl (NOT PERL)?











up vote
-1
down vote

favorite












The only difference between miniperl and perl is that miniperl cannot load XS-based perl modules as shared objects. So it can't load WIN32 or CWD modules.



Is it possible to get Current Working Directory in miniperl?










share|improve this question






















  • Can it run external programs via backticks/qx?
    – Shawn
    Nov 8 at 10:11










  • I don't want to use external programs.
    – NoSkill
    Nov 8 at 10:28










  • Does your program use chdir internally? Could you read the working directory from %ENV maybe?
    – martin clayton
    Nov 8 at 11:21










  • No my $dir = qx/pwd/; then? What OS is this for?
    – Shawn
    Nov 8 at 11:26






  • 1




    And none of us want to waste time with an XY problem, which, given the odd requirements and lack of explanation, this sounds like.
    – Shawn
    Nov 8 at 14:54















up vote
-1
down vote

favorite












The only difference between miniperl and perl is that miniperl cannot load XS-based perl modules as shared objects. So it can't load WIN32 or CWD modules.



Is it possible to get Current Working Directory in miniperl?










share|improve this question






















  • Can it run external programs via backticks/qx?
    – Shawn
    Nov 8 at 10:11










  • I don't want to use external programs.
    – NoSkill
    Nov 8 at 10:28










  • Does your program use chdir internally? Could you read the working directory from %ENV maybe?
    – martin clayton
    Nov 8 at 11:21










  • No my $dir = qx/pwd/; then? What OS is this for?
    – Shawn
    Nov 8 at 11:26






  • 1




    And none of us want to waste time with an XY problem, which, given the odd requirements and lack of explanation, this sounds like.
    – Shawn
    Nov 8 at 14:54













up vote
-1
down vote

favorite









up vote
-1
down vote

favorite











The only difference between miniperl and perl is that miniperl cannot load XS-based perl modules as shared objects. So it can't load WIN32 or CWD modules.



Is it possible to get Current Working Directory in miniperl?










share|improve this question













The only difference between miniperl and perl is that miniperl cannot load XS-based perl modules as shared objects. So it can't load WIN32 or CWD modules.



Is it possible to get Current Working Directory in miniperl?







perl getcwd cwd






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 8 at 10:00









NoSkill

1047




1047












  • Can it run external programs via backticks/qx?
    – Shawn
    Nov 8 at 10:11










  • I don't want to use external programs.
    – NoSkill
    Nov 8 at 10:28










  • Does your program use chdir internally? Could you read the working directory from %ENV maybe?
    – martin clayton
    Nov 8 at 11:21










  • No my $dir = qx/pwd/; then? What OS is this for?
    – Shawn
    Nov 8 at 11:26






  • 1




    And none of us want to waste time with an XY problem, which, given the odd requirements and lack of explanation, this sounds like.
    – Shawn
    Nov 8 at 14:54


















  • Can it run external programs via backticks/qx?
    – Shawn
    Nov 8 at 10:11










  • I don't want to use external programs.
    – NoSkill
    Nov 8 at 10:28










  • Does your program use chdir internally? Could you read the working directory from %ENV maybe?
    – martin clayton
    Nov 8 at 11:21










  • No my $dir = qx/pwd/; then? What OS is this for?
    – Shawn
    Nov 8 at 11:26






  • 1




    And none of us want to waste time with an XY problem, which, given the odd requirements and lack of explanation, this sounds like.
    – Shawn
    Nov 8 at 14:54
















Can it run external programs via backticks/qx?
– Shawn
Nov 8 at 10:11




Can it run external programs via backticks/qx?
– Shawn
Nov 8 at 10:11












I don't want to use external programs.
– NoSkill
Nov 8 at 10:28




I don't want to use external programs.
– NoSkill
Nov 8 at 10:28












Does your program use chdir internally? Could you read the working directory from %ENV maybe?
– martin clayton
Nov 8 at 11:21




Does your program use chdir internally? Could you read the working directory from %ENV maybe?
– martin clayton
Nov 8 at 11:21












No my $dir = qx/pwd/; then? What OS is this for?
– Shawn
Nov 8 at 11:26




No my $dir = qx/pwd/; then? What OS is this for?
– Shawn
Nov 8 at 11:26




1




1




And none of us want to waste time with an XY problem, which, given the odd requirements and lack of explanation, this sounds like.
– Shawn
Nov 8 at 14:54




And none of us want to waste time with an XY problem, which, given the odd requirements and lack of explanation, this sounds like.
– Shawn
Nov 8 at 14:54












1 Answer
1






active

oldest

votes

















up vote
1
down vote



accepted










Yes, it's possible using the following:



chomp( my $cwd = `cd` );





share|improve this answer





















  • Thanks! It uses OS command, but it's OK for Win32.
    – NoSkill
    Nov 9 at 12:11











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














 

draft saved


draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53205339%2fis-it-possible-to-get-current-working-directory-in-miniperl-not-perl%23new-answer', 'question_page');
}
);

Post as a guest
































1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes








up vote
1
down vote



accepted










Yes, it's possible using the following:



chomp( my $cwd = `cd` );





share|improve this answer





















  • Thanks! It uses OS command, but it's OK for Win32.
    – NoSkill
    Nov 9 at 12:11















up vote
1
down vote



accepted










Yes, it's possible using the following:



chomp( my $cwd = `cd` );





share|improve this answer





















  • Thanks! It uses OS command, but it's OK for Win32.
    – NoSkill
    Nov 9 at 12:11













up vote
1
down vote



accepted







up vote
1
down vote



accepted






Yes, it's possible using the following:



chomp( my $cwd = `cd` );





share|improve this answer












Yes, it's possible using the following:



chomp( my $cwd = `cd` );






share|improve this answer












share|improve this answer



share|improve this answer










answered Nov 9 at 11:31









ikegami

259k10172392




259k10172392












  • Thanks! It uses OS command, but it's OK for Win32.
    – NoSkill
    Nov 9 at 12:11


















  • Thanks! It uses OS command, but it's OK for Win32.
    – NoSkill
    Nov 9 at 12:11
















Thanks! It uses OS command, but it's OK for Win32.
– NoSkill
Nov 9 at 12:11




Thanks! It uses OS command, but it's OK for Win32.
– NoSkill
Nov 9 at 12:11


















 

draft saved


draft discarded



















































 


draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53205339%2fis-it-possible-to-get-current-working-directory-in-miniperl-not-perl%23new-answer', 'question_page');
}
);

Post as a guest




















































































Popular posts from this blog

Schultheiß

Verwaltungsgliederung Dänemarks

Liste der Kulturdenkmale in Wilsdruff