The here-doc modifier ~ allows you to indent your here-docs to make the code more readable:It's not obvious to me what "the delimiter" is and how was it declared. To me, it's an odd use of the word "delimiter".This will print...if ($some_var) { print <<~EOF; This is a here-doc EOF }...with no leading whitespace.This is a here-docThe delimiter is used to determine the exact whitespace to remove from the beginning of each line.
Am I correct in assuming that what's meant is: when you write "<<~EOF;", Perl will take the initial whitespace characters from the following line as an "indentation definition" and remove it from the beginning of every line in the here-doc?
In reply to indented here-doc "delimiter" by ibm1620
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |