in reply to open2 with windows diskpart
You're going through a lot of trouble to ignore exceptions that don't even exist.
my $pid; eval { $pid = open2(\*OUT, \*IN, 'diskpart'); }; if ($@ and $@ =~ /^open2:/) { die "$@:$!\n"; }
should be
my $pid = open2(\*OUT, \*IN, 'diskpart');
$! is already included in the error message if appropriate. Even in some situations where it's not. (Perl RT66572)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: open2 with windows diskpart
by wxfield (Novice) on Jun 17, 2009 at 00:51 UTC | |
by ikegami (Patriarch) on Jun 17, 2009 at 01:59 UTC | |
by Anonymous Monk on Jun 17, 2009 at 02:50 UTC | |
by ikegami (Patriarch) on Jun 17, 2009 at 05:18 UTC | |
by wxfield (Novice) on Jun 17, 2009 at 12:48 UTC |