You can also use a HEREDOC but interpolation still occurs so the backslash needs escaping.
$ cat > testfile line 1 line 2 line 3 line 4 line 5 $ perl -e ' > $result = <<`EOC`; > tail -2 \\ > testfile > EOC > print $result;' line 4 line 5 $
I hope this is of interest.
Cheers,
JohnGG
In reply to Re: Backtics execution with multiple lines
by johngg
in thread Backtics execution with multiple lines
by ivanatora
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |