CodeMirror: Perl mode

 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
 
#!/usr/bin/perl
 
use Something qw(func1 func2);
 
# strings
my $s1 = qq'single line';
our $s2 = q(multi-
              line);
 
=item Something
    Example.
=cut
 
my $html=<<'HTML'
<html>
<title>hi!</title>
</html>
HTML
 
print "first,".join(',', 'second', qq~third~);
 
if($s1 =~ m[(?<!\s)(l.ne)\z]o) {
    $h->{$1}=$$.' predefined variables';
    $s2 =~ s/\-line//ox;
    $s1 =~ s[
          line ]
        [
          block
        ]ox;
}
 
1; # numbers and comments
 
__END__
something...
 
 

MIME types defined: text/x-perl.