use strict; use warnings; my $cmd=qq|showargs NODEBUG=1 "ADDED_CFLAGS=/DCOST_EN_US /DPAYMENT_CREDIT_CARD"|; print "$cmd\n"; open(RS,"$cmd 2>&1 |") or die "Can't open pipe: $!\n"; while () { 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