all repos — NoPaste @ 4d5201f1a9fd36bf5ab4e04de97fc70c12081b9a

Resurrected - The PussTheCat.org fork of NoPaste

scripts/CodeMirror/mode/perl/index.html (view raw)

 1<!doctype html>
 2
 3<title>CodeMirror: Perl mode</title>
 4<meta charset="utf-8"/>
 5<link rel=stylesheet href="../../doc/docs.css">
 6
 7<link rel="stylesheet" href="../../lib/codemirror.css">
 8<script src="../../lib/codemirror.js"></script>
 9<script src="perl.js"></script>
10<style>.CodeMirror {border-top: 1px solid black; border-bottom: 1px solid black;}</style>
11<div id=nav>
12  <a href="https://codemirror.net"><h1>CodeMirror</h1><img id=logo src="../../doc/logo.png" alt=""></a>
13
14  <ul>
15    <li><a href="../../index.html">Home</a>
16    <li><a href="../../doc/manual.html">Manual</a>
17    <li><a href="https://github.com/codemirror/codemirror">Code</a>
18  </ul>
19  <ul>
20    <li><a href="../index.html">Language modes</a>
21    <li><a class=active href="#">Perl</a>
22  </ul>
23</div>
24
25<article>
26<h2>Perl mode</h2>
27
28
29<div><textarea id="code" name="code">
30#!/usr/bin/perl
31
32use Something qw(func1 func2);
33
34# strings
35my $s1 = qq'single line';
36our $s2 = q(multi-
37              line);
38
39=item Something
40	Example.
41=cut
42
43my $html=<<'HTML'
44<html>
45<title>hi!</title>
46</html>
47HTML
48
49print "first,".join(',', 'second', qq~third~);
50
51if($s1 =~ m[(?<!\s)(l.ne)\z]o) {
52	$h->{$1}=$$.' predefined variables';
53	$s2 =~ s/\-line//ox;
54	$s1 =~ s[
55		  line ]
56		[
57		  block
58		]ox;
59}
60
611; # numbers and comments
62
63__END__
64something...
65
66</textarea></div>
67
68    <script>
69      var editor = CodeMirror.fromTextArea(document.getElementById("code"), {
70        lineNumbers: true
71      });
72    </script>
73
74    <p><strong>MIME types defined:</strong> <code>text/x-perl</code>.</p>
75  </article>