in reply to How to open a pipe from CMD if CMD has quotes?
Here's the output, showing the complete quoted second argument you had:use strict; use warnings; my $cmd=qq|showargs NODEBUG=1 "ADDED_CFLAGS=/DCOST_EN_US /DPAYMENT_CRE +DIT_CARD"|; print "$cmd\n"; open(RS,"$cmd 2>&1 |") or die "Can't open pipe: $!\n"; while (<RS>) { print; } close(RS);
showargs NODEBUG=1 "ADDED_CFLAGS=/DCOST_EN_US /DPAYMENT_CREDIT_CARD" Arguments were: 0: NODEBUG=1 1: ADDED_CFLAGS=/DCOST_EN_US /DPAYMENT_CREDIT_CARD
---
s;;:<).>|\;\;_>?\\^0<|=!]=,|{\$/.'>|<?.|/"&?=#!>%\$|#/\$%{};;y;,'} -/:-@[-`{-};,'}`-{/" -;;s;;$_;see;
Warning: Any code posted by tuxz0r is untested, unless otherwise stated, and is used at your own risk.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to open a pipe from CMD if CMD has quotes?
by slloyd (Hermit) on Dec 05, 2007 at 01:07 UTC | |
by tuxz0r (Pilgrim) on Dec 05, 2007 at 01:12 UTC | |
by slloyd (Hermit) on Dec 05, 2007 at 05:24 UTC |