SyntaxHighlighter 3.0.83

Fork Me On GitHub
whats new?
SyntaxHighlighter is an open source Java Script client side code syntax highlighter.
donate download installation autoloader configuration @syntaxhighlight

Perl Example

      #!/usr/bin/perl
      
      use strict;
      use warnings;
      
      use LWP::Socket;
      use FCGI::ProcManager qw/ pm_manage pm_pre_dispatch pm_post_dispatch /;
      
      # Prepare content and headers
      my $content = join "", map { $_ } <DATA>;
      my $headers ="HTTP/1.1 200 OK\r\n"
                  . "Server: FlaresunsFakeServer/2009-09-10\r\n"
                  . "Content-Type: text/html\r\n"
                  . "Content-Length: " . length($content). "\r\n"
                  . "Connection: close\r\n\r\n";
      
      # Prepare and open socket
      my $sock = new LWP::Socket();
      $sock->bind('127.0.0.1', '8080');
      $sock->listen(10);
      
      # Create 5 childs
      pm_manage(n_processes => 5); 
      
      while ( my $socket = $sock->accept(10) ) { 
          pm_pre_dispatch();
          $socket->write($headers);
          $socket->write($content);
          $socket->shutdown();
          pm_post_dispatch();
      }
      
      $sock->shutdown();
      
      __DATA__
      <html>
      <head><title>Hi</title></head>
      <body>
          <h1>Hello from Habr!</h1>
      </body>
      </html>
      
Brush nameBrush aliasesFile name
ActionScript3as3, actionscript3shBrushAS3.js
Bash/shellbash, shellshBrushBash.js
ColdFusioncf, coldfusionshBrushColdFusion.js
C#c-sharp, csharpshBrushCSharp.js
C++cpp, cshBrushCpp.js
CSScssshBrushCss.js
Delphidelphi, pas, pascalshBrushDelphi.js
Diffdiff, patchshBrushDiff.js
Erlangerl, erlangshBrushErlang.js
GroovygroovyshBrushGroovy.js
JavaScriptjs, jscript, javascriptshBrushJScript.js
JavajavashBrushJava.js
JavaFXjfx, javafxshBrushJavaFX.js
Perlperl, plshBrushPerl.js
PHPphpshBrushPhp.js
Plain Textplain, textshBrushPlain.js
PowerShellps, powershellshBrushPowerShell.js
Pythonpy, pythonshBrushPython.js
Rubyrails, ror, rubyshBrushRuby.js
ScalascalashBrushScala.js
SQLsqlshBrushSql.js
Visual Basicvb, vbnetshBrushVb.js
XMLxml, xhtml, xslt, html, xhtmlshBrushXml.js