See top of page 15 in Chapter 4 "Subs and Signatures" for an example. The following code looks fine in subs-and-sigs.pod:
my $dance = '';
my %moves =
hands-over-head => sub { $dance ~= '/o\ ' },
bird-arms => sub { $dance ~= '|/o| ' },
left => sub { $dance ~= '>o ' },
right => sub { $dance ~= 'o< ' },
arms-up => sub { $dance ~= '\o/ ' };
my @awesome-dance = ;
for @awesome-dance -> $move {
%moves{$move}.();
}
...but it looks strange in the .pdf (e.g., lots of upside-down question marks and other odd-looking glyphs).
See top of page 15 in Chapter 4 "Subs and Signatures" for an example. The following code looks fine in subs-and-sigs.pod: my $dance = ''; my %moves = hands-over-head => sub { $dance ~= '/o\ ' }, bird-arms => sub { $dance ~= '|/o| ' }, left => sub { $dance ~= '>o ' }, right => sub { $dance ~= 'o< ' }, arms-up => sub { $dance ~= '\o/ ' };
my @awesome-dance =;
for @awesome-dance -> $move {
%moves{$move}.();
}
...but it looks strange in the .pdf (e.g., lots of upside-down question marks and other odd-looking glyphs).