1<script class="brush: perl;" type="syntaxhighlighter">
2#!/usr/local/bin/perl
3use strict; #! comment (not shebang)
4use Some::Module 0.01 qw( imports
5  exports );
6
7$Some::Module::Var = [ 'arrayref' ];
8my %hash = %Package::Stash::;
9
10our @array = 1 .. 3;
11print $#array, $array[0];
12
13do { my $arr = [ 0, 1 ]; print $#$arr, @$arr };
14
15local $ENV{FOO} = qq[BAR $foo];
16call(func => "args", opt => q#val#, code => \&amp;baz);
17
18=pod
19
20This is C<perl> documentation.
21
22=cut
23
24LABEL: {
25  do { something(); }
26  undef;
27  Object-&gt;new();
28}
29
30sub something (;$) { Print @_ } # upper-case P
31*Other::Package::foo = sub { q!bad! };
32my $str = do { my $empty = q{}; $empty .= q'_'; };
33
34print <<HERE;
35 doc;
36HERE
37
38say 1 + 1;
39
40Load(&lt;&lt;'...'); # YAML heredoc
41---
42type: yaml
43...
44
45print 1; __END__
46print 2;  # won't print; after script
47__DATA__
48fake file handle
49</script>
50<script class="brush: perl;" type="syntaxhighlighter">
51# comment
52
53=head1 Some Pod
54
55Don't let a =cut break the next =pod
56
57=cut
58
59=head2 More pod
60
61Ensure the above =cut doesn't break this
62
63=cut
64
65=head1 Foo
66
67No 'cut' block, it just ends.
68</script>
69