Skip to content

Instantly share code, notes, and snippets.

@PatrickCronin
Created August 5, 2020 01:25
Show Gist options
  • Save PatrickCronin/d49350ec62cdb7d432988ab1df28d9ef to your computer and use it in GitHub Desktop.
Save PatrickCronin/d49350ec62cdb7d432988ab1df28d9ef to your computer and use it in GitHub Desktop.
my @vals = (<<'SQL', 1);
SELECT *
FROM the_table
WHERE id=$1
SQL
my @vals = (<<~'SQL', 1);
SELECT *
FROM the_table
WHERE id=$1
SQL
@PatrickCronin
Copy link
Author

The second statement is the indented heredoc. It has the <<~ introductory terminator (as opposed to just <<), and whitespace before the end terminator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment