Skip to content

Commit

Permalink
faq string interpolation and html
Browse files Browse the repository at this point in the history
  • Loading branch information
gfldex committed Jan 31, 2016
1 parent 1f83b6c commit 22ea0e0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/Language/faq.pod
Expand Up @@ -342,6 +342,18 @@ There are several reasons:
=item they aren't mandatory, since you can declare sigilless names (if you don't mind the ambiguity)
=head2 "Type Str does not support associative indexing."
You likely tried to mix string interpolation and HTML.
my $foo = "abc";
say "$foo<html-tag>";
Perl 6 thinks C<$foo> to be a Hash and C«<html-tag>» to be a string literal
hash key. Use a closure to help it to understand you.
my $foo = "abc";
say "{$foo}<html-tag>";
=head2 Does Perl 6 have coroutines? What about C<yield>?
Expand Down

0 comments on commit 22ea0e0

Please sign in to comment.