my $multiline_string = <<HERE;
The idea is that once you start the Here Doc, everything you type is taken as part of your string until you tell it that it's time to stop, in this case by putting HERE on its own line.
In PowerShell you can do something similar, using @' and '@ or @" and "@. Everything from the @' or @" to the '@ or "@ is considered part of the same string.
PS C:\Users\tojo2000\Documents> $multiline_string = @'
PS C:\Users\tojo2000\Documents\> $multiline_string
Note that the multiline strings use single and double quotes to control variable interpolation just like regular single and double quotes. Any variables in a multiline double-quoted string will be expanded.
Why would you want to do this? There are a lot of situations in which this can make your strings a lot more readable. As an example, let's say you have a SQL query:
$sql = 'SELECT * FROM employees INNER JOIN parking ON parking.emp_id = employees.emp_id WHERE parking.size = "Compact"';
compare that to this:
$sql = @'
SELECT * FROM employees
INNER JOIN parking
ON parking.emp_id = employees.emp_id
WHERE parking.size = "Compact"