Hello monks!:
I've several problems with qx and system on a windows machine.
This is the code I'm running:
#c:\perl\bin\perl.exe -w
use CGI 'param','header';
print header('text/plain');
print "Dir:\n";
print `cmd.exe /c dir c:\\temp`;
print "\n\nver:\n";
print `cmd.exe /c ver -a`;
exit(0);
and this is the result:
Dir:
Acceso denegado.
ver:
Microsoft Windows 2000 [Versi¢n 5.00.2195]
If I run the code in my own windows machine or in a linux machine, it works correctly;
but if I run the code in a "production machine" I can´t execute a dir command.
(I can execute 'copy', 'ver', etc etc, but no 'dir')
I think that is a permission problem... but I don't know which are the permissions Perl need in this case.
c:\temp has rwx permissions for all
%windir\system32 has rx permmisions for all
%windir has rx permmisions for all
.pl is mapped to perl.exe %s %s
c:\perl has read permisions for all
I'm using activeperl 5.6.1 build 626
Does anybody kwow how Perl makes system calls?
Which are the dlls or files that Perl need to make this system calls?
Of course, the 'dir' is only an example; what I have to make is a call to a third program. This system call doesn't work.
Thanks in advance
Hopes
$_=$,=q,\,@4O,,s,^$,$\,,s,s,^,b9,s,
$_^=q,$\^-]!,,print
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.