in reply to Running command with backslash not working as expected
In your first example the \r is enclosed in back-quotes which interpolate the same as a double quoted string, so \r gets translated to the carriage return character.
In the second example the \r is enclosed in single quotes which do not interpolate so it contains the two characters \ and r.
You need to enclose the string in double quotes:
my $value = qq[ -c "normal \r" -c wq ~/vimwiki/testing.md];
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Running command with backslash not working as expected
by nysus (Parson) on May 09, 2019 at 12:55 UTC | |
|
Re^2: Running command with backslash not working as expected
by nysus (Parson) on May 09, 2019 at 14:04 UTC |