in reply to Is it possible to execute some command in qx argument

This is a shell question, not a Perl question. Remove the double quotes, they prevent shell from splitting the arguments on whitespace:
qx($cmd currentdate$arg);

BTW, qx returns the output of the command it runs, if you're not interested in the output, use system instead.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,

Replies are listed 'Best First'.
Re^2: Is it possible to execute some command in qx argument
by vladimirfedorov (Novice) on May 05, 2017 at 06:44 UTC
    Well the point is that I cannot modify the script, right now, all I can do is to pass different arguments to the script. Is it possible to pass an argument that will allow splitting commands?
      Oh, I see, wasn't reading carefuly.
      my $arg = '"; mkdir "otherdir';
      ($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,
        Ok, it worked perfectly in command line but when testing end to end I found out that all quotes and apostrophes were replaced with &aquot; and & apos;. The arguments are being passed in the vm through an xml, so I guess that's why they were converted. Is there a way to do the same without apostrophes or quotes?