freddo411 has asked for the wisdom of the Perl Monks concerning the following question:
I'm not understanding how the backticks operator is working in ActiveState.
How can I execute $cmd so that it "works" as I intend?
Some output shows that it is doing something funny to the /s and /q cmdline options of rmdir.foreach ( 7100 .. 7114 ) { my $path = File::Spec->catdir( $topdir, "$_/hosted/docs/cdm4/msoff +ice" ); my $cmd = "rmdir /s /q $path"; print "$cmd \n"; print `$cmd` . "\n"; }
I'm running:rmdir /s /q D:\sites\cust\7112\hosted\docs\cdm4\msoffice rmdir: failed to remove `/s': No such file or directory rmdir: failed to remove `/q': No such file or directory rmdir: failed to remove `D:\\sites\\cust\\7112\\hosted\\docs\\cdm4\\ms +office': Directory not empty
D:\z>perl -v <br> This is perl, v5.10.0 built for MSWin32-x86-multi-thread
-------------------------------------
Nothing is too wonderful to be true
-- Michael Faraday
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Issue with backticks in ActiveState
by GrandFather (Saint) on Sep 08, 2009 at 21:10 UTC | |
Re: Issue with backticks in ActiveState
by pKai (Priest) on Sep 08, 2009 at 21:15 UTC | |
by freddo411 (Chaplain) on Sep 08, 2009 at 23:06 UTC | |
Re: Issue with backticks in ActiveState
by toolic (Bishop) on Sep 08, 2009 at 20:21 UTC | |
Re: Issue with backticks in ActiveState
by Marshall (Canon) on Sep 08, 2009 at 21:38 UTC | |
Re: Issue with backticks in ActiveState
by ikegami (Patriarch) on Sep 09, 2009 at 00:08 UTC | |
Re: Issue with backticks in ActiveState
by Anonymous Monk on Sep 08, 2009 at 21:24 UTC |
Back to
Seekers of Perl Wisdom