We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On perlop there is a rather complex example of using << with ():
myfunc(<< "THIS", 23, <<'THAT'); Here's a line or two. THIS and here's another. THAT
There perhaps ought to be a an additional simpler example first,
print uc(<<EOF); abc EOF
Except I don't know where on that page to put it.
Perhaps someone could put something like that somewhere on that page. Thanks.
The text was updated successfully, but these errors were encountered:
I always do:
my $person = 'John'; print uc <<~ "TEXT"; # add space around, quote the token, might always use ~ Hello, $person! And the text goes on. TEXT
Which results in:
HELLO, JOHN! AND THE TEXT GOES ON.
Not sure if bareword token is recommended.
Wish ~ were always there, added by default (for indentation = readability).
~
NB. EOF (end of file) in the example could be replaced ith EOT (end of text) for clarity
EOF
EOT
And that "THIS" could include a $variable within the heredoc (to use its surrounding double quotes for a purpose)
"THIS"
$variable
Sorry, something went wrong.
Well all that is great to mention too. All I know is a user is trying to lookup how to stuff a <<EOF into ( ) in a hurry.
perlop: Add here-doc examples
fb88e73
Fixes Perl#20886
d1dfe9f
Successfully merging a pull request may close this issue.
On perlop there is a rather complex example of using << with ():
There perhaps ought to be a an additional simpler example first,
Except I don't know where on that page to put it.
Perhaps someone could put something like that somewhere on that page. Thanks.
The text was updated successfully, but these errors were encountered: