Skip to main content.
home | support | download

Back to List Archive

Re: Running programs on Windows

From: Bill Moseley <moseley(at)>
Date: Tue Sep 28 2004 - 14:52:36 GMT
My test was incomplete.  Could you two lines to the test from

Calls the same "my" program.

#!/usr/bin/perl -w
use strict;

use IPC::Open2;

my @command = (
      'first arg1', 
      '"second arg2"',
      'word "quoted" and \"backslashed\" word',
      '"2word "quoted" and \"backslashed\" word"',

my $pid = IPC::Open2::open2( \*r, \*w, @command );

print "Pid = $pid\n";
print "output:\n";
print while $_ = <r>;
print "done\n";

(output is)

Pid = 316925
316925 [first arg1]

316925 [second arg2]

316925 [word]

316925 [quoted]

316925 [and]

316925 ["backslashed"]

316925 [word]

316925 [2word quoted and "backslashed" word]

316925 done


Oh, ya, that makes sense.

Does that also happen on Win 2000? or WinXP?

Bill Moseley

Unsubscribe from or help with the swish-e list:

Help with Swish-e:
Received on Tue Sep 28 07:52:49 2004