I finally wrote it just like this:
my $command = "C:\\Windows\\system32\\runas.exe /user:ctldomain\\$us +er \"c:\\Program Files\\Internet Explorer\\iexplore.exe \"c:\""; system($command) or print "error running command: $!\n" and exit;
But i have to reconsider using a list as suggested by you and others.
In reply to Re^2: System command with quotes and variables
by mellin
in thread System command with quotes and variables
by mellin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |