in reply to diskpart.exe and perl

See IPC::Open2.

--shmem

_($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                              /\_¯/(q    /
----------------------------  \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}

Replies are listed 'Best First'.
Re^2: diskpart.exe and perl
by neo1491 (Beadle) on Nov 10, 2007 at 22:10 UTC
    did that response help me or hurt me?
      How do you feel about it? My intention was to help. I don't know what diskpart.exe expects or sends, but IPC::Open2 is the right tool to deal with input and output to/from an external program.

      --shmem

      _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                    /\_¯/(q    /
      ----------------------------  \__(m.====·.(_("always off the crowd"))."·
      ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
        ah, i didn't see the "use IPC::Open2;". that's exactly what i was looking for... thank you!!!
        in that case, thank you very much although i don't understand it. i'll spend some time and try to make sense of it.
      < quasi-snide>Perhaps you mistakenly believed PM to be a fee-free, script-writing service?</q-snide>

      Customarily, you'll get more useful assistance (which we do offer, freely, and often with real pleasure) if you

      • show us what you've tried (eg: code))
      • Show that you've put some effort into the job... as, for example, citing a node or document that (got you started || didn't quite do what you wanted, but left you with a subordinate problem || at least demonstrates that you've actually taken some steps toward becoming aware of perl's capabilities.

      I'd suggest you update your original node (update! not replace) with at bit more info... the above, plus what diskpart.exe expects as input and perhaps what its output looks like... and perhaps some code that reflects your attempt to understand and act on shmem's suggestion.

        my apologies... i certainly didn't mean to offend. just didn't understand the response and was making a joke. i am just learning perl and don't want to take up too much of anyone's time. my original attempt to send a command to diskpart.exe looked something like this:
        open ( FH , "diskpart rescan|" ) || die ( "Failed to open filehandle.\ +n" ) ; my @inFile = <FH> ; # read all at once into array foreach (@inFile){ print $_."\t"; }
        Being a novice to Perl, I sometimes don't know when a question I have may be totally idiotic so I try to keep my questions short. Again, no offense intended.