Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: IIS 5.0 perl problem

by Sandy (Deacon)
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 musing on the Monastery: (6)
As of 2014-09-16 05:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (156 votes), past polls