foreach (@ARGV){print "'$_'\n";} EXAMPLE A parameters - "A A\" B output - 'A A" B' EXAMPLE B parameters - "A A" B output - 'A A' output - 'B' #example B is how batch files (and all apps I've used) behave in windows. Also, \ is the path delimiter in windows, so it's natural to have one at the end of an argument.