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?
perl getcwd cwd
|
show 9 more comments
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?
perl getcwd cwd
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
Nomy $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
|
show 9 more comments
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?
perl getcwd cwd
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
perl getcwd cwd
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
Nomy $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
|
show 9 more comments
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
Nomy $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
|
show 9 more comments
1 Answer
1
active
oldest
votes
up vote
1
down vote
accepted
Yes, it's possible using the following:
chomp( my $cwd = `cd` );
Thanks! It uses OS command, but it's OK for Win32.
– NoSkill
Nov 9 at 12:11
add a comment |
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` );
Thanks! It uses OS command, but it's OK for Win32.
– NoSkill
Nov 9 at 12:11
add a comment |
up vote
1
down vote
accepted
Yes, it's possible using the following:
chomp( my $cwd = `cd` );
Thanks! It uses OS command, but it's OK for Win32.
– NoSkill
Nov 9 at 12:11
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Yes, it's possible using the following:
chomp( my $cwd = `cd` );
Yes, it's possible using the following:
chomp( my $cwd = `cd` );
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
add a comment |
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
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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