Skip to main content.
home | support | download

Back to List Archive

Re: Running programs on Windows

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

Calls the same "my test.pl" program.


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

use IPC::Open2;

my @command = (
      'perl', 
      'my test.pl', 
      '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
output:
316925 [first arg1]

316925 [second arg2]

316925 [word]

316925 [quoted]

316925 [and]

316925 ["backslashed"]

316925 [word]

316925 [2word quoted and "backslashed" word]

316925 done

done


Oh, ya, that makes sense.

Does that also happen on Win 2000? or WinXP?





-- 
Bill Moseley
moseley@hank.org

Unsubscribe from or help with the swish-e list: 
   http://swish-e.org/Discussion/

Help with Swish-e:
   http://swish-e.org/current/docs
   swish-e@sunsite.berkeley.edu
Received on Tue Sep 28 07:52:49 2004