No such thing as a small change | |
PerlMonks |
trying to pass variable through system call in windowsby mmmmms (Initiate) |
on Jan 31, 2014 at 18:12 UTC ( [id://1072889]=perlquestion: print w/replies, xml ) | Need Help?? |
mmmmms has asked for the wisdom of the Perl Monks concerning the following question:
Hi all, I'm a little new to perl. I am trying to pass a variable through my system cmd but can't get the variable through. This works and displays the value of $file1:
system qq[echo ${file1}]; C:\Users\MeinerzM\Desktop\MPS_files\wotis\soc2b2014099d07.210000 However when I try to combine with a perl expression the value gets lost: system qq["perl -i.bak -lpe \'tr/\r//d\'" ${file1}]; I get "the system could not find the specified path". Any ideas? When I type the value directly it works fine, just have trouble passing through the variable.
Back to
Seekers of Perl Wisdom
|
|