| 5 |
lars |
1 |
<!doctype html>
|
|
|
2 |
<title>CodeMirror: Perl mode</title>
|
|
|
3 |
<meta charset="utf-8" />
|
|
|
4 |
<link rel=stylesheet href="../../doc/docs.css">
|
|
|
5 |
<link rel="stylesheet" href="../../lib/codemirror.css">
|
|
|
6 |
<script src="../../lib/codemirror.js"></script>
|
|
|
7 |
<script src="perl.js"></script>
|
|
|
8 |
<style type="text/css">
|
|
|
9 |
.CodeMirror {
|
|
|
10 |
border-top: 1px solid black;
|
|
|
11 |
border-bottom: 1px solid black;
|
|
|
12 |
}
|
|
|
13 |
</style>
|
|
|
14 |
<div id=nav>
|
|
|
15 |
<a href="http://codemirror.net">
|
|
|
16 |
<h1>CodeMirror</h1>
|
|
|
17 |
<img id=logo src="../../doc/logo.png">
|
|
|
18 |
</a>
|
|
|
19 |
<ul>
|
|
|
20 |
<li>
|
|
|
21 |
<a href="../../index.html">Home</a>
|
|
|
22 |
<li>
|
|
|
23 |
<a href="../../doc/manual.html">Manual</a>
|
|
|
24 |
<li>
|
|
|
25 |
<a href="https://github.com/codemirror/codemirror">Code</a>
|
|
|
26 |
</ul>
|
|
|
27 |
<ul>
|
|
|
28 |
<li>
|
|
|
29 |
<a href="../index.html">Language modes</a>
|
|
|
30 |
<li>
|
|
|
31 |
<a class=active href="#">Perl</a>
|
|
|
32 |
</ul>
|
|
|
33 |
</div>
|
|
|
34 |
<article>
|
|
|
35 |
<h2>Perl mode</h2>
|
|
|
36 |
<div>
|
|
|
37 |
<textarea id="code" name="code"> #!/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=
|
|
|
38 |
<< 'HTML' <html>
|
|
|
39 |
<title>hi!</title>
|
|
|
40 |
|
|
|
41 |
</html> HTML print "first,".join(',', 'second', qq~third~); if($s1 =~ m[(?
|
|
|
42 |
<!\s)(l.ne)\z]o) {
|
|
|
43 |
$h->{$1}=$$.' predefined variables'; $s2 =~ s/\-line//ox; $s1 =~ s[ line ] [ block ]ox; } 1; # numbers and comments __END__ something... </textarea>
|
|
|
44 |
</div>
|
|
|
45 |
<script>
|
|
|
46 |
var editor = CodeMirror.fromTextArea(document.getElementById("code"),
|
|
|
47 |
{
|
|
|
48 |
lineNumbers: true
|
|
|
49 |
});
|
|
|
50 |
</script>
|
|
|
51 |
<p>
|
|
|
52 |
<strong>MIME types defined:</strong> <code>text/x-perl</code>.</p>
|
|
|
53 |
</article>
|