mvip has asked for the wisdom of the Perl Monks concerning the following question:
Hi all, im new in perl :P so i would like to ask a stupid question ( no its not stupid if you are noob :D ) so here it is ... i would like to execute two commands ( about the health of hard drive ) the first command is "wmic" and that command is opening new line ( or something like telnet try it ) after that i have to execute the "diskdrive get status" so i can get the results and i like to write that result in variable so for now i have this code but i get error on the second system command it cant be execute. Any help or solution ....
use strict; use warnings; use diagnostics; system ('wmic'); system ('diskdrive get status');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Execute wmic command in cmd
by BrowserUk (Patriarch) on May 15, 2013 at 14:27 UTC | |
by mvip (Acolyte) on May 15, 2013 at 17:39 UTC | |
by BrowserUk (Patriarch) on May 15, 2013 at 17:44 UTC | |
by roboticus (Chancellor) on May 15, 2013 at 17:45 UTC | |
by mvip (Acolyte) on May 16, 2013 at 12:08 UTC | |
by marto (Cardinal) on May 16, 2013 at 12:18 UTC | |
|
Re: Execute wmic command in cmd
by ww (Archbishop) on May 15, 2013 at 14:26 UTC |