Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: IIS 5.0 perl problem

by Sandy (Curate)
on Aug 21, 2009 at 20:42 UTC ( #790465=note: print w/ replies, xml ) Need Help??


in reply to IIS 5.0 perl problem

You forgot your quotes around `dir`.

If you are executing on Unix, then it is trying to execute the executable "dir" and outputting the results.

This does what you want

$> perl -e 'print "`dir`\n"' `dir` $>


Comment on Re: IIS 5.0 perl problem
Download Code
Re^2: IIS 5.0 perl problem
by ikegami (Pope) on Aug 22, 2009 at 03:39 UTC
    He *wants* to execute dir.
      It's not executing any shell commands period. I agree, it's something Microsoft is doing that is stopping perl from working. If I ever find an answer, I'll come back and update the problem. Thanks to both of you for your help!
        Its either %PATH% or permissions
        C:\tmp>which dir which: no dir in (.;C:/WINDOWS;C:/WINDOWS/System32;C:/WINDOWS/System32 +/Wbem;C:/Perl/bin;C:/Program Files/gnuwin32/bin) C:\tmp>which cmd C:/WINDOWS/system32/cmd.EXE C:\tmp>perl -V:sh sh='cmd /x /c'; C:\tmp>perl -le"print `dir`" Volume in drive C has no label. Volume Serial Number is 1QQ1-0EF1 Directory of C:\tmp 08/22/2009 08:57 PM <DIR> . 08/22/2009 08:57 PM <DIR> .. 08/22/2009 08:57 PM 13 one 1 File(s) 13 bytes 2 Dir(s) 3,758,039,040 bytes free C:\tmp>perl -le"print `cmd /x /c dir`" Volume in drive C has no label. Volume Serial Number is 1QQ1-0EF1 Directory of C:\tmp 08/22/2009 08:57 PM <DIR> . 08/22/2009 08:57 PM <DIR> .. 08/22/2009 08:57 PM 13 one 1 File(s) 13 bytes 2 Dir(s) 3,757,842,432 bytes free C:\tmp>perl -le"undef $ENV{PATH};print `dir`" C:\tmp>perl -le"undef $ENV{PATH};print `C:\\WINDOWS\\system32\\cmd.EXE + /x /c dir`" Volume in drive C has no label. Volume Serial Number is 1QQ1-0EF1 Directory of C:\tmp 08/22/2009 08:57 PM <DIR> . 08/22/2009 08:57 PM <DIR> .. 08/22/2009 08:57 PM 13 one 1 File(s) 13 bytes 2 Dir(s) 3,756,990,464 bytes free C:\tmp>

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://790465]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (7)
As of 2015-07-02 04:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (27 votes), past polls