in reply to Learn Unix multiline syntax
Just like the shell interprets "\"+newline as a single newline, so does Perl in double-quoted and backtick literals.
$ perl -le'$_="\ "; print length;' 1
To pass "\"+newline to the shell, you'll need to escape the backslash.
$ perl -e'print `echo foo bar` ' sh: line 1: bar: command not found foo $ perl -e'print `echo foo \ bar` ' sh: line 1: bar: command not found foo $ perl -e'print `echo foo \\ bar` ' foo bar
|
|---|